-
Notifications
You must be signed in to change notification settings - Fork 3
/
get_python2.sh
executable file
·41 lines (35 loc) · 827 Bytes
/
get_python2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
echo get_python2.sh ===========================================================
source setenv.sh
function get {
if [ ! -d "$ourname" ]
then
if [ ! \( -f $tarname -o -L $tarname \) ]
then
if [ -f ../$tarname -o -L ../$tarname ]
then
ln -s "../$tarname" "$tarname"
elif [ -f ../../$tarname -o -L ../../$tarname ]
then
ln -s "../../$tarname" "$tarname"
else
download_file "$url"
fi
fi
if ! ${JUST_CACHE_SOURCES:-false}
then
tar -xzf "$tarname"
mv "$basename" "$ourname"
rm -f "$tarname"
fi
fi
}
version="2.7.18"
basename="Python-$version"
tarname="$basename.tgz"
url="https://www.python.org/ftp/python/$version/$tarname"
ourname="python2_source"
get