#!/bin/sh
if [ $# -lt 1 ]; then
echo "[FAILED]please input project name."
else
if [ -d /home/admin/work/$1 ]; then
cd /home/admin/work/$1
svn up > files
find -name "files" -exec grep ".vm" {} \;|while read LINE
do
if [ -z "$LINE" ]; then
continue
fi
echo "find template changed : $LINE"
f="/home/admin/work/${1}/${LINE##* }"
t="/home/admin/${1}/target/${1}.war/${LINE##*web/src/main/webapp/}"
cp $f $t
done
echo "[SUCCESS]syn is ok."
else
echo "[FAILED] '$1' is not a project folder."
fi
fi
exit 0 </pre>
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。