mirror of
https://github.com/zhigang1992/now-deployment.git
synced 2026-06-15 10:17:59 +08:00
21 lines
533 B
Bash
Executable File
21 lines
533 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
# Use the system installed python3
|
|
PYTHONBIN="$( command -v python3 || command -v python || echo '' )"
|
|
if [ -z "$PYTHONBIN" ]; then
|
|
echo "Please install Python 3"
|
|
exit 1
|
|
fi
|
|
|
|
# Check if python version is 3
|
|
PYTHONVERSION="$( "$PYTHONBIN" --version 2>&1 )"
|
|
case "$PYTHONVERSION" in
|
|
"Python 3"*) ;;
|
|
*) echo "Please install Python 3" && exit 1 ;;
|
|
esac
|
|
|
|
# Execute the "python" runtime bootstrap
|
|
export LAMBDA_RUNTIME_DIR="$(dirname "$0")/../python"
|
|
exec "$PYTHONBIN" "$LAMBDA_RUNTIME_DIR/bootstrap.py" "$@"
|