replaceAutoconfig.sh
869 Bytes
#!/bin/bash
#AUTOCONFIG_PATH=/home/test/deploy2/auto_deploy_test/autoconfig/test_nj_4/config4deploy2
AUTOCONFIG_PATH=$(pwd)
for file in $AUTOCONFIG_PATH/*.properties
do
SYS_NAME=$(echo $file | awk -F "${AUTOCONFIG_PATH}/" '{print $2}' | awk -F '-autoconfig' '{print $1}')
sed -i "s/autoconfig.properties.sharedAutoconfig.*/autoconfig.properties.sharedAutoconfig = file:\/home\/test\/auto_deploy_test\/autoconfig\/test_performance\/global-autoconfig.properties/g" $file
sed -i "s/.env.webapphome.*/.env.webapphome = \/home\/test\/yohoJavaApp\/${SYS_NAME}\/deploy\/target/g" $file
echo "$SYS_NAME done!"
done
echo "ALL DONE"
echo "不包含yohoJavaApp test_performance的............"
cd $AUTOCONFIG_PATH
find ./ -name "*.properties" | xargs grep -e "autoconfig.properties.sharedAutoconfig" -e ".env.webapphome" | grep -v yohoJavaApp | grep -v test_performance