24 lines
530 B
Bash
Executable File
24 lines
530 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# get real path of softlink
|
|
get_real_path() {
|
|
local f="$1"
|
|
while [ -h "$f" ]; do
|
|
ls=`ls -ld "$f"`
|
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
if expr "$link" : '/.*' > /dev/null; then
|
|
f="$link"
|
|
else
|
|
f=`dirname "$f"`/"$link"
|
|
fi
|
|
done
|
|
eval "$2"="'$f'"
|
|
}
|
|
|
|
get_real_path "$0" prg_path
|
|
echo "Script Path [$prg_path]"
|
|
PROJECT_HOME=$(dirname $prg_path)
|
|
echo "Project Home [$PROJECT_HOME]"
|
|
cd "$PROJECT_HOME"
|
|
mvn tomcat7:run -pl mapper -am -Ddev=true
|