-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·38 lines (33 loc) · 851 Bytes
/
setup.sh
File metadata and controls
executable file
·38 lines (33 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# update checking
echo "Checking for updates"
git fetch
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse @{u})
BASE=$(git merge-base @ @{u})
if [ "$LOCAL" = "$REMOTE" ]; then
echo "Up to date"
elif [ "$LOCAL" = "$BASE" ]; then
echo "Update found"
python3 src/updater.py
PY_RET=$?
if [ "$PY_RET" -eq 0 ]; then
echo "Downloading update"
git pull
elif [ "$PY_RET" -eq 1 ]; then
echo "Skipping update"
elif [ "$PY_RET" -eq 2 ]; then
echo "Operation cancelled"
exit 0
fi
else
echo "Local is ahead of remote, skipping update check"
fi
# init
echo "Attempting creation of virtual environment"
python3 -m venv venv
source venv/bin/activate
echo "Upgrading dependencies"
pip3 install --upgrade --verbose -r requirements.txt
export PYWEBVIEW_GUI=qt
python3 src/main.py