* make sure USER environment variable is set

This commit is contained in:
Reinhard Pointner 2015-06-07 19:14:33 +00:00
parent 6e03eaa5c9
commit d4a13b7eb3
1 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,12 @@ APP_ROOT=`cd "$PRG_DIR" && pwd`
# restore original working dir
cd "$WORKING_DIR"
# make sure required environment variables are set
if [ -z "$USER" ]
then
export USER=`whoami`
fi
# user per user app data location to avoid permission conflicts between root and admin users
APP_DATA="$APP_ROOT/data/$USER"