Fix echo command. Handle LOGNAME being empty in situations like a Docker container.
This commit is contained in:
5
run.sh
5
run.sh
@ -51,6 +51,9 @@ fi
|
|||||||
cd $DIR
|
cd $DIR
|
||||||
|
|
||||||
sudo=""
|
sudo=""
|
||||||
|
if [[ -z $LOGNAME ]]; then
|
||||||
|
LOGNAME="`whoami`"
|
||||||
|
fi
|
||||||
if [[ $LOGNAME != "root" ]]; then
|
if [[ $LOGNAME != "root" ]]; then
|
||||||
log "Using sudo since user is '$LOGNAME'."
|
log "Using sudo since user is '$LOGNAME'."
|
||||||
sudo="sudo"
|
sudo="sudo"
|
||||||
@ -70,7 +73,7 @@ if [[ ! `which npm` ]]; then
|
|||||||
$sudo apt-get install -y npm
|
$sudo apt-get install -y npm
|
||||||
fi
|
fi
|
||||||
if [[ ! `which curl` ]]; then
|
if [[ ! `which curl` ]]; then
|
||||||
echo "- Installing NPM"
|
echo "- Installing Curl"
|
||||||
$sudo apt-get install -y curl
|
$sudo apt-get install -y curl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user