1
1
#! /bin/bash
2
2
3
3
set -euo pipefail
4
+ cache=" $HOME " /.cache/matplotlib
4
5
5
6
fold_start () {
6
7
key=$1
@@ -23,7 +24,7 @@ cached_download() {
23
24
file=$1
24
25
url=$2
25
26
shasum=$3
26
- path=" $HOME /Downloads /$file "
27
+ path=" $cache /$file "
27
28
if [[ ! -f " $path "
28
29
|| " $( shasum -a 256 " $path " | awk ' {print $1}' ) " != " $shasum " ]]
29
30
then
@@ -35,7 +36,7 @@ fold_start Python "Install Python 3.8 from python.org"
35
36
cached_download python-3.8.5-macosx10.9.pkg \
36
37
https://www.python.org/ftp/python/3.8.5/python-3.8.5-macosx10.9.pkg \
37
38
e27c5a510c10f830084fb9c60b9e9aa8719d92e4537a80e6b4252c02396f0d29
38
- sudo installer -package " $HOME " /Downloads /python-3.8.5-macosx10.9.pkg -target /
39
+ sudo installer -package " $cache " /python-3.8.5-macosx10.9.pkg -target /
39
40
sudo ln -s /usr/local/bin/python3 /usr/local/bin/python
40
41
hash -r
41
42
fold_end Python
@@ -44,7 +45,7 @@ fold_start ccache 'Install ccache (compile it ourselves)'
44
45
cached_download ccache-3.7.11.tar.xz \
45
46
https://github.com/ccache/ccache/releases/download/v3.7.11/ccache-3.7.11.tar.xz \
46
47
8d450208099a4d202bd7df87caaec81baee20ce9dd62da91e9ea7b95a9072f68
47
- tar xf " $HOME " /Downloads /ccache-3.7.11.tar.xz
48
+ tar xf " $cache " /ccache-3.7.11.tar.xz
48
49
pushd ccache-3.7.11
49
50
./configure --prefix=/usr/local
50
51
make -j2
@@ -60,5 +61,5 @@ cached_download freetype-2.6.1.tar.gz \
60
61
https://download.savannah.gnu.org/releases/freetype/freetype-2.6.1.tar.gz \
61
62
0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014
62
63
mkdir -p build
63
- tar -x -C build -f " $HOME " /Downloads /freetype-2.6.1.tar.gz
64
+ tar -x -C build -f " $cache " /freetype-2.6.1.tar.gz
64
65
fold_end freetype
0 commit comments