bring indentation in line with other front-end projects

This commit is contained in:
Bruno Windels 2018-08-14 12:53:16 +02:00
parent 2c983f8cee
commit 377a20fffa
22 changed files with 583 additions and 560 deletions

View file

@ -3,8 +3,8 @@ RIOT_BRANCH=master
BASE_DIR=$(readlink -f $(dirname $0))
if [ -d $BASE_DIR/riot-web ]; then
echo "riot is already installed"
exit
echo "riot is already installed"
exit
fi
cd $BASE_DIR

View file

@ -5,7 +5,7 @@ PIDFILE=$BASE_DIR/riot.pid
CONFIG_BACKUP=config.e2etests_backup.json
if [ -f $PIDFILE ]; then
exit
exit
fi
cd $BASE_DIR/
@ -14,29 +14,29 @@ pushd riot-web/webapp/ > /dev/null
# backup config file before we copy template
if [ -f config.json ]; then
mv config.json $CONFIG_BACKUP
mv config.json $CONFIG_BACKUP
fi
cp $BASE_DIR/config-template/config.json .
LOGFILE=$(mktemp)
# run web server in the background, showing output on error
(
python -m SimpleHTTPServer $PORT > $LOGFILE 2>&1 &
PID=$!
echo $PID > $PIDFILE
# wait so subshell does not exit
# otherwise sleep below would not work
wait $PID; RESULT=$?
python -m SimpleHTTPServer $PORT > $LOGFILE 2>&1 &
PID=$!
echo $PID > $PIDFILE
# wait so subshell does not exit
# otherwise sleep below would not work
wait $PID; RESULT=$?
# NOT expected SIGTERM (128 + 15)
# from stop.sh?
if [ $RESULT -ne 143 ]; then
echo "failed"
cat $LOGFILE
rm $PIDFILE 2> /dev/null
fi
rm $LOGFILE
exit $RESULT
# NOT expected SIGTERM (128 + 15)
# from stop.sh?
if [ $RESULT -ne 143 ]; then
echo "failed"
cat $LOGFILE
rm $PIDFILE 2> /dev/null
fi
rm $LOGFILE
exit $RESULT
)&
# to be able to return the exit code for immediate errors (like address already in use)
# we wait for a short amount of time in the background and exit when the first
@ -46,6 +46,6 @@ sleep 0.5 &
wait -n; RESULT=$?
# return exit code of first child to exit
if [ $RESULT -eq 0 ]; then
echo "running"
echo "running"
fi
exit $RESULT

View file

@ -6,15 +6,15 @@ CONFIG_BACKUP=config.e2etests_backup.json
cd $BASE_DIR
if [ -f $PIDFILE ]; then
echo "stopping riot server ..."
PID=$(cat $PIDFILE)
rm $PIDFILE
kill $PID
echo "stopping riot server ..."
PID=$(cat $PIDFILE)
rm $PIDFILE
kill $PID
# revert config file
cd riot-web/webapp
rm config.json
if [ -f $CONFIG_BACKUP ]; then
mv $CONFIG_BACKUP config.json
fi
# revert config file
cd riot-web/webapp
rm config.json
if [ -f $CONFIG_BACKUP ]; then
mv $CONFIG_BACKUP config.json
fi
fi