代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/fuseide 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/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!"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。