npbackup/bin/COMPILE.sh

22 lines
481 B
Bash
Raw Normal View History

2023-03-26 21:36:17 +08:00
#!/usr/bin/env bash
# This is an example compiler script
machine="$(uname -m)"
2023-03-30 07:57:41 +08:00
2023-03-26 21:36:17 +08:00
cd /opt/npbackup
2023-03-28 20:45:21 +08:00
OLD_PYTHONPATH="$PYTHONPATH"
2023-03-26 21:36:17 +08:00
export PYTHONPATH=/opt/npbackup
if [ "$(printf %.3s $machine)" = "arm" ] || [ "$machine" = "aarch64" ]; then
2023-03-30 07:57:41 +08:00
opts=" --no-gui"
echo "BUILDING WITHOUT GUI because arm detected"
else
otps=""
echo "BUILDING WITH GUI"
2023-03-30 07:57:41 +08:00
fi
/opt/npbackup/venv/bin/python bin/compile.py --audience all $opts
2023-03-28 20:45:21 +08:00
export PYTHONPATH="$OLD_PYTHONPATH"