33 lines
686 B
Bash
Executable File
33 lines
686 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'"
|
|
}
|
|
|
|
currDir=$(pwd)
|
|
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"
|
|
cd "$PROJECT_HOME/web"
|
|
ember b -prod -o "$targetPath"
|
|
cd "$currDir"
|