-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathrun-dev.sh
More file actions
executable file
·24 lines (19 loc) · 878 Bytes
/
run-dev.sh
File metadata and controls
executable file
·24 lines (19 loc) · 878 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
#!/bin/bash
# create empty line distance from previous run
# for improved readibility of output
printf "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
printf "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
# Dir to this script, e.g. /home/user/bin/
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo $SCRIPTPATH
# check if setup files have been touched recently
SETUP_PY_MOD=$(expr $(expr $(date +%s) - $(date -r "$SCRIPTPATH/src/setup.py" +"%s")) / 60)
SETUP_CFG_MOD=$(expr $(expr $(date +%s) - $(date -r "$SCRIPTPATH/src/setup.cfg" +"%s")) / 60)
# set quick exit and verbose shell output
# set -ex
if [ 2 -gt $SETUP_PY_MOD ] || [ 2 -gt $SETUP_CFG_MOD ]; then
echo "Installing peerjs"
pip3 install --editable src
fi
# python3 $SCRIPTPATH/http-proxy.py
python3 -m peerjs.ext.http-proxy