]> git.cameronkatri.com Git - apple_cmds.git/blobdiff - download.sh
system_cmds: 880.120.1
[apple_cmds.git] / download.sh
index 54b86a83a7febee09e1023010524e308513a0de0..3145687f1500754268670879a0196ccd649c72e0 100755 (executable)
@@ -7,8 +7,10 @@ if [ "$( echo -e "${version}\n$(cat ${1}/.apple_version)" | sort -V | tail -n 1)
        echo "${1} - $(cat ${1}/.apple_version)"
 else
        echo "${1} - $(cat ${1}/.apple_version) -> ${version}"
-       TEMP=$(mktemp -d)
-       wget -q -P${TEMP} https://opensource.apple.com/tarballs/${1}/${1}-${version}.tar.gz
-       tar xf ${TEMP}/${1}-${2}.tar.gz -C ${1} --strip-components=1
+       wget -q https://opensource.apple.com/tarballs/${1}/${1}-${version}.tar.gz
+       rm -rf ${1}
+       mkdir ${1}
+       tar xf ${1}-${version}.tar.gz -C ${1} --strip-components=1
        echo "${version}" > ${1}/.apple_version
+       rm ${1}-${version}.tar.gz
 fi