2023-03-26 21:36:17 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# This is an example compiler script
|
|
|
|
|
2023-03-30 08:02:42 +08:00
|
|
|
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
|
|
|
|
|
2023-03-30 08:02:42 +08:00
|
|
|
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=""
|
2023-03-30 08:02:42 +08:00
|
|
|
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"
|