@@ -19,16 +19,32 @@ fold_end() {
1919 echo -e " travis_fold:end:$key \e[2K"
2020}
2121
22+ cached_download () {
23+ file=$1
24+ url=$2
25+ shasum=$3
26+ path=" $HOME /Downloads/$file "
27+ if [[ ! -f " $path "
28+ || " $( shasum -a 256 " $HOME /Downloads/$file " | awk ' {print $1}' ) " != " $shasum " ]]
29+ then
30+ curl -L -o " $path " " $url "
31+ fi
32+ }
33+
2234fold_start Python " Install Python 3.8 from python.org"
23- curl -O https://www.python.org/ftp/python/3.8.5/python-3.8.5-macosx10.9.pkg
24- sudo installer -package python-3.8.5-macosx10.9.pkg -target /
35+ cached_download python-3.8.5-macosx10.9.pkg \
36+ https://www.python.org/ftp/python/3.8.5/python-3.8.5-macosx10.9.pkg \
37+ e27c5a510c10f830084fb9c60b9e9aa8719d92e4537a80e6b4252c02396f0d29
38+ sudo installer -package " $HOME " /Downloads/python-3.8.5-macosx10.9.pkg -target /
2539sudo ln -s /usr/local/bin/python3 /usr/local/bin/python
2640hash -r
2741fold_end Python
2842
2943fold_start ccache ' Install ccache (compile it ourselves)'
30- curl -O -L https://github.com/ccache/ccache/releases/download/v3.7.11/ccache-3.7.11.tar.xz
31- tar xf ccache-3.7.11.tar.xz
44+ cached_download ccache-3.7.11.tar.xz \
45+ https://github.com/ccache/ccache/releases/download/v3.7.11/ccache-3.7.11.tar.xz \
46+ 8d450208099a4d202bd7df87caaec81baee20ce9dd62da91e9ea7b95a9072f68
47+ tar xf " $HOME " /Downloads/ccache-3.7.11.tar.xz
3248pushd ccache-3.7.11
3349./configure --prefix=/usr/local
3450make
4056fold_end ccache
4157
4258fold_start freetype ' Install freetype (just unpack into the build directory)'
43- curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-2.6.1.tar.gz
59+ cached_download freetype-2.6.1.tar.gz \
60+ https://download.savannah.gnu.org/releases/freetype/freetype-2.6.1.tar.gz \
61+ 0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014
4462mkdir -p build
45- tar -x -C build -f freetype-2.6.1.tar.gz
63+ tar -x -C build -f " $HOME " /Downloads/ freetype-2.6.1.tar.gz
4664fold_end freetype
0 commit comments