Created
April 17, 2018 08:16
-
-
Save chen1i/1a5db9ac0d7fd3d4812a07ec1b856718 to your computer and use it in GitHub Desktop.
一键替换背景图片和logo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if (( $# < 1 )); then | |
echo "Run as root: ./OEM.sh <customer_name>" | |
exit 2 | |
fi | |
JS_DIR=/opt/cloudchef/tomcat/webapps/ROOT/WEB-INF/classes/static/javascripts/ | |
OEM=$1 | |
while : ; do | |
[[ ! -d $JS_DIR ]] || break | |
echo "waiting for war file deploying ... " | |
sleep 10 | |
done | |
pushd $JS_DIR | |
JS_FILE=$(ls scripts*.js) | |
sed -i "s/\(templateUrl:\"login\/partial\/\)login.html/\1login_$OEM.html/g" $JS_FILE | |
sed -i "s/\(templateUrl:\"main\/partial\/\)main.html/\1main_$OEM.html/g" $JS_FILE | |
popd | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment