yoqw/launch_module.sh
2020-07-15 10:42:42 +08:00

32 lines
636 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
echo "$f"
}
prg_path=$(get_real_path "$0")
echo "Script path [$prg_path]"
# Service Home
pushd $(dirname "$prg_path")
WORK_DIR=$(pwd)
echo "Work dir [$WORK_DIR]"
if [ -z "$1" ]; then
echo 'Usage: ./launch_module.sh module(cms,fsagent...)'
exit 1
fi
mvn -T 4C clean -pl $1 -am -DskipTests spring-boot:run