]> git.cameronkatri.com Git - apple_cmds.git/commitdiff
download.sh: Add script
authorCameron Katri <me@cameronkatri.com>
Thu, 20 May 2021 19:50:08 +0000 (15:50 -0400)
committerCameron Katri <me@cameronkatri.com>
Thu, 20 May 2021 19:50:08 +0000 (15:50 -0400)
download.sh [new file with mode: 0755]

diff --git a/download.sh b/download.sh
new file mode 100755 (executable)
index 0000000..3c3d0cc
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+TEMP=$(mktemp -d)
+wget -q -P${TEMP} https://opensource.apple.com/tarballs/${1}/${1}-${2}.tar.gz
+tar xf ${TEMP}/${1}-${2}.tar.gz -C ${1} --strip-components=1
+echo "${2}" > ${1}/.apple_version