1 Star 0 Fork 3

yy135/fuseide

forked from Gitee 极速下载/fuseide 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
changeEclipse.sh 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
#########################################
# this script can be used to change the #
# Eclipse version #
# #
# Initial version from lhein, 2018 #
#########################################
# check parameter count and provide help if count doesn't match
if [ "$#" -ne 2 ]; then
echo "Illegal number of parameters"
echo "Please specify the old and the new Eclipse name like this:"
echo " changeVersion.sh <oldEclipseName> <newEclipseName>"
echo "Example:"
echo " changeVersion.sh oxygen photon"
exit 0
fi
# uppercase the versions
CMD_1=$1
CMD_2=$2
OLD_ECLIPSE=${CMD_1,,}
NEW_ECLIPSE=${CMD_2,,}
echo "Using the following settings:"
echo " Old Eclipse Name: $OLD_ECLIPSE"
echo " New Eclipse Name: $NEW_ECLIPSE"
echo "Replacing now..."
###################
## REPLACE LOGIC ##
###################
# first replace all lowercase words like in URLs or identifiers
find * -name '*.xml' | xargs perl -pi -e "s/$OLD_ECLIPSE/$NEW_ECLIPSE/g"
find * -name '*.target' | xargs perl -pi -e "s/$OLD_ECLIPSE/$NEW_ECLIPSE/g"
find * -name '*.md' | xargs perl -pi -e "s/$OLD_ECLIPSE/$NEW_ECLIPSE/g"
# now replace all other occurrences with first letter capitalized
find * -name '*.xml' | xargs perl -pi -e "s/${OLD_ECLIPSE^}/${NEW_ECLIPSE^}/g"
find * -name '*.target' | xargs perl -pi -e "s/${OLD_ECLIPSE^}/${NEW_ECLIPSE^}/g"
find * -name '*.md' | xargs perl -pi -e "s/${OLD_ECLIPSE^}/${NEW_ECLIPSE^}/g"
echo "DONE!"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ydbg/fuseide.git
git@gitee.com:ydbg/fuseide.git
ydbg
fuseide
fuseide
master

搜索帮助