lemo-crm/web/deploy
Shaun Chyxion 9acac63351 complete
2017-07-04 00:06:44 +08:00

30 lines
634 B
Bash
Executable File

#!/bin/sh
# 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]"
# Service Home
pushd $(dirname "$prg_path") > /dev/null
PROJECT_HOME=$(dirname $(pwd))
popd > /dev/null
# ember build
targetPath="$PROJECT_HOME/server/crm/src/main/resources/static"
rm -rf "$targetPath"
ember b -prod -o "$targetPath"