循环删除目录文件00-remove-dev-cfg.sh

2019年12月12日 作者 刘剑
#!/bin/bash


echo '=================================================================='
echo '拷贝test环境配置文件到开发者配置文件'
echo 'Author:lj, Date:2019-6-18'
echo '=================================================================='

currentDir=$PWD
echo "当前目录=${currentDir}"


for file in $(ls | grep -E 'center|service|ex|api|label-internal')
do
    echo -e "\n---------------------------------------------------------------"

    if [ -e ${file}/src/main/resources/ ]; then
        cd ${file}/src/main/resources/
    else
        echo "非法目录"
        continue
    fi


    echo "进入到 `pwd`"

    if [ -e application.properties ]; then
        rm -fv application.properties
    fi

    if [ -e application-dev.yaml ]; then
        rm -fv application-dev.yaml
    fi

    cd ${currentDir}
done