diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:16 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:16 -0800 |
commit | 82ea7a177797b844b252effea5c7c7c5d63ea4ac (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /eclipse/scripts/update_version.sh | |
parent | c9432be76d50a527da232d518f633add2f76242b (diff) | |
download | sdk-82ea7a177797b844b252effea5c7c7c5d63ea4ac.zip sdk-82ea7a177797b844b252effea5c7c7c5d63ea4ac.tar.gz sdk-82ea7a177797b844b252effea5c7c7c5d63ea4ac.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'eclipse/scripts/update_version.sh')
-rw-r--r-- | eclipse/scripts/update_version.sh | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/eclipse/scripts/update_version.sh b/eclipse/scripts/update_version.sh deleted file mode 100644 index a288965..0000000 --- a/eclipse/scripts/update_version.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -OLD="$1" -NEW="$2" - -# sanity check in input args -if [ -z "$OLD" ] || [ -z "$NEW" ]; then - cat <<EOF -Usage: $0 <old> <new> -Changes the ADT plugin revision number. -Example: - cd tools/eclipse - scripts/update_version.sh 0.1.2 0.2.3 -EOF - exit 1 -fi - -# sanity check on current dir -if [ `basename "$PWD"` != "eclipse" ]; then - echo "Please run this from tools/eclipse." - exit 1 -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 - -# 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" - |