Skip to content

Commit b6fe97a

Browse files
authored
Revert cmd.sh to manage python runtimes
1 parent ec1ab51 commit b6fe97a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/bash
22
set -e
33

4-
su $DEFAULT_USER -c "npm install --production"
4+
if [ "$RUNTIME" == "python" ] || [ "$RUNTIME" == "python2" ] || [ "$RUNTIME" == "python2.7" ]; then
5+
su $DEFAULT_USER -c "pip install --requirement requirements.txt --upgrade --target ."
6+
elif [ "$RUNTIME" == "python3" ] || [ "$RUNTIME" == "python3.6" ] || [ "$RUNTIME" == "python3.7" ]; then
7+
su $DEFAULT_USER -c "pip3 install --requirement requirements.txt --upgrade --target ."
8+
else
9+
su $DEFAULT_USER -c "npm install --production"
10+
fi

0 commit comments

Comments
 (0)