diff options
Diffstat (limited to 'eclipse/scripts/update_version.sh')
-rwxr-xr-x[-rw-r--r--] | eclipse/scripts/update_version.sh | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/eclipse/scripts/update_version.sh b/eclipse/scripts/update_version.sh index a288965..c7198af 100644..100755 --- a/eclipse/scripts/update_version.sh +++ b/eclipse/scripts/update_version.sh @@ -22,16 +22,10 @@ if [ `basename "$PWD"` != "eclipse" ]; then fi # quote dots for regexps -OLD="${OLD//./\.}" -NEW="${NEW//./\.}" - -# Find all the files with the old pattern, except changes.txt and -# p4 edit them. Skip that if there's no p4 in path. -if which g4 1>/dev/null 2>/dev/null ; then - grep -rl "$OLD" * | grep -E "\.xml$|\.MF$" | xargs -n 5 g4 edit -fi +OLD="${OLD//./\.}\.qualifier" +NEW="${NEW//./\.}\.qualifier" # Now find the same files but this time use sed to replace in-place with # the new pattern. Old files get backuped with the .old extension. -grep -rl "$OLD" * | grep -E "\.xml$|\.MF$" | xargs -n 1 sed -i.old "s/$OLD/$NEW/g" +grep -rl "$OLD" * | grep -E "\.xml$|\.MF$" | xargs -n 1 sed -i -e "s/$OLD/$NEW/g" |