bin: Quote expansions that are subject to field splitting

This commit is contained in:
Richard Hansen 2020-05-14 17:40:16 -04:00
parent a28b7c7595
commit 57237b8568
5 changed files with 23 additions and 23 deletions

View file

@ -6,7 +6,7 @@ error() { log "ERROR: $@" >&2; }
fatal() { error "$@"; exit 1; }
# Move to the folder where ep-lite is installed
cd $(dirname $0)
cd "$(dirname "$0")"
# Was this script started in the bin folder? if yes move out
if [ -d "../bin" ]; then
@ -22,7 +22,7 @@ do
done
# Stop the script if it's started as root
if [ "$(id -u)" -eq 0 ] && [ $ignoreRoot -eq 0 ]; then
if [ "$(id -u)" -eq 0 ] && [ "$ignoreRoot" -eq 0 ]; then
echo "You shouldn't start Etherpad as root!"
echo "Please type 'Etherpad rocks my socks' or supply the '--root' argument if you still want to start it as root"
read rocks