]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
gamepack-manager: fix extra-urls trick
authorThomas Debesse <dev@illwieckz.net>
Mon, 5 Nov 2018 14:50:25 +0000 (15:50 +0100)
committerThomas Debesse <dev@illwieckz.net>
Mon, 5 Nov 2018 14:50:47 +0000 (15:50 +0100)
gamepack-manager

index d7669659a14363c2f3dac24c702a9ee8c2efcdb2..6f280f6e0d112e505c4a7fe48d44e2d2fb14cb04 100755 (executable)
@@ -224,18 +224,14 @@ getValue () {
 
 downloadExtraUrls ()
 {
-       local dir
-
-       dir="${1}"
-
-       if [ -f "${dir}/extra-urls.txt" ]
+       if [ -f 'extra-urls.txt' ]
        then
-               while IFS='     ' read -r FILE URL
+               while IFS='     ' read -r extra_file extra_url
                do
                        (
-                               ${WGET} -O "${dir}/${FILE}" "${URL}"
+                               ${WGET} -O "${extra_file}" "${extra_url}"
                        ) </dev/null
-               done < "${dir}/extra-urls.txt"
+               done < 'extra-urls.txt'
        fi
 }
 
@@ -334,11 +330,11 @@ downloadPack () {
                                ;;
                esac
 
-               if [ -d "${download_dir}/${pack}" ]
+               if [ -d "${pack}" ]
                then
                        (
-                               cd "${download_dir}/${pack}"
-                               downloadExtraUrls "${pack}"
+                               cd "${pack}"
+                               downloadExtraUrls
                        )
                fi