Skip to content

Commit

Permalink
Refactored entrypoint behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
dgonzalez committed Aug 25, 2016
1 parent eebcc68 commit f9f5eb7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions rootfs/app-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,17 @@ log () {
echo -e "\033[0;33m$(date "+%H:%M:%S")\033[0;37m ==> $1."
}

if [ "$1" == "activator" -a "$2" == "run" ] ; then
if [ "$1" == "activator" -a "$2" == "~run" ] ; then
if [ ! -d $PROJECT_DIRECTORY ] ; then
log "Creating example Play application"
log "Creating example Play application"
cd /app
activator new $PLAY_PROJECT_NAME $PLAY_TEMPLATE
log "Play app created"
cd $PLAY_PROJECT_NAME
else
log "App already created"
cd $PROJECT_DIRECTORY
cd $PROJECT_DIRECTORY
fi
fi

# Making sure we end up in the project directory
cd $PROJECT_DIRECTORY

exec /entrypoint.sh "$@"

0 comments on commit f9f5eb7

Please sign in to comment.