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 d766965..6f280f6 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