forked from playframework/playframework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
play
executable file
·33 lines (30 loc) · 939 Bytes
/
play
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /usr/bin/env sh
if [ -f conf/application.conf ]; then
if test "$1" = "clean"; then
`dirname $0`/framework/cleanIvyCache
fi
if test "$1" = "stop"; then
if [ -f RUNNING_PID ]; then
echo "[info] Stopping application (with PID `cat RUNNING_PID`)..."
kill `cat RUNNING_PID`
RESULT=$?
if test "$RESULT" = 0; then
echo "[info] Done!"
exit 0
else
echo "[\033[31merror\033[0m] Failed ($RESULT)"
exit $RESULT
fi
else
echo "[\033[31merror\033[0m] No RUNNING_PID file. Is this application running?"
exit 1
fi
fi
if [ -n "$1" ]; then
`dirname $0`/framework/build "$@"
else
`dirname $0`/framework/build play
fi
else
java -Dsbt.ivy.home=`dirname $0`/repository -Dplay.home=`dirname $0`/framework -Dsbt.boot.properties=`dirname $0`/framework/sbt/play.boot.properties -jar `dirname $0`/framework/sbt/sbt-launch-0.11.0.jar "$@"
fi