|
2 | 2 | set -e
|
3 | 3 |
|
4 | 4 | if [ `whoami` == "root" ]; then
|
5 |
| - |
6 |
| - if [ "$RUNTIME" == "" ]; then |
7 |
| - echo "Using default runtime node v8" |
8 |
| - fi |
9 |
| - |
10 |
| - if [ "$RUNTIME" == "node" ]; then |
11 |
| - echo "Using default node v8 runtime" |
12 |
| - fi |
13 |
| - |
14 |
| - if [ "$RUNTIME" == "node6" ]; then |
15 |
| - echo "Setting node runtime to v6" |
| 5 | + if [ "$RUNTIME" == "python" ] || [ "$RUNTIME" == "python2" ] || [ "$RUNTIME" == "python2.7" ]; then |
| 6 | + echo "Using python v2.7 runtime" |
| 7 | + elif [ "$RUNTIME" == "python3" ] || [ "$RUNTIME" == "python3.7" ]; then |
| 8 | + echo "Using python v3.7 runtime" |
| 9 | + elif [ "$RUNTIME" == "python3.6" ]; then |
| 10 | + echo "Using python v3.6 runtime" |
| 11 | + ln -sf /opt/python-${PYTHON_VERSION_3_6}/bin/python3 /usr/bin/python3 |
| 12 | + ln -sf /opt/python-${PYTHON_VERSION_3_6}/bin/pip3 /usr/bin/pip3 |
| 13 | + elif [ "$RUNTIME" == "node6" ]; then |
| 14 | + echo "Using node v6 runtime" |
16 | 15 | rm /usr/local/bin/node /usr/local/bin/npm
|
17 | 16 | ln -sf /opt/node-v${NODE_VERSION_6}-linux-x64/bin/node /usr/local/bin/node
|
18 | 17 | ln -sf /opt/node-v${NODE_VERSION_6}-linux-x64/bin/npm /usr/local/bin/npm
|
19 |
| - fi |
20 |
| - |
21 |
| - if [ "$RUNTIME" == "node8" ]; then |
22 |
| - echo "Setting node runtime to v8" |
23 |
| - rm /usr/local/bin/node /usr/local/bin/npm |
24 |
| - ln -sf /opt/node-v${NODE_VERSION_8}-linux-x64/bin/node /usr/local/bin/node |
25 |
| - ln -sf /opt/node-v${NODE_VERSION_8}-linux-x64/bin/npm /usr/local/bin/npm |
26 |
| - fi |
27 |
| - |
28 |
| - if [ "$RUNTIME" == "python" ]; then |
29 |
| - echo "Using default python v2 runtime" |
30 |
| - ln -sf /usr/bin/python2.7 /usr/bin/python2 |
31 |
| - fi |
32 |
| - |
33 |
| - if [ "$RUNTIME" == "python2" ]; then |
34 |
| - echo "Setting python runtime to 2" |
35 |
| - ln -sf /usr/bin/python2.7 /usr/bin/python2 |
36 |
| - fi |
37 |
| - |
38 |
| - if [ "$RUNTIME" == "python3.6" ]; then |
39 |
| - echo "Setting python runtime to 3.6" |
40 |
| - ln -sf /opt/python-${PYTHON_VERSION_3_6}/bin/python3 /usr/bin/python3 |
41 |
| - ln -sf f/opt/python-${PYTHON_VERSION_3_6}/bin/pip3 /usr/bin/pip3 |
42 |
| - fi |
43 |
| - |
44 |
| - if [ "$RUNTIME" == "python3.7" ]; then |
45 |
| - echo "Setting python runtime to 3.7" |
46 |
| - ln -sf /opt/python-${PYTHON_VERSION_3_7}/bin/python3 /usr/bin/python3 |
47 |
| - ln -sf /opt/python-${PYTHON_VERSION_3_7}/bin/pip3 /usr/bin/pip3 |
| 18 | + else |
| 19 | + echo "Using node v8 runtime" |
48 | 20 | fi
|
49 | 21 |
|
50 | 22 | if [ "$HOST_UID" != "" ]; then
|
|
0 commit comments