]>
git.cameronkatri.com Git - apple_cmds.git/blob - download.sh
2 version
="$(basename $(curl -s https://opensource.apple.com/tarballs/${1}/ | \
3 pup 'table tbody tr td a:not([href=".
/..
/"]) text{}' -c | \
4 sort -V | tail -n 1) .tar.gz | \
5 rev | cut -d- -f 1 | rev)"
6 if [ "$( echo -e "${version}\n$(cat ${1}/.apple_version)" | sort -V | tail -n 1)" = "$(cat ${1}/.apple_version)" ]; then
7 echo "${1} - $(cat ${1}/.apple_version)"
9 echo "${1} - $(cat ${1}/.apple_version) -> ${version}"
11 wget -q -P${TEMP} https://opensource.apple.com/tarballs/${1}/${1}-${version}.tar.gz
12 tar xf ${TEMP}/${1}-${version}.tar.gz -C ${1} --strip-components=1
13 echo "${version}" > ${1}/.apple_version