X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fauxiliar%2Fupdate-patch-version.sh;fp=scripts%2Fauxiliar%2Fupdate-patch-version.sh;h=22286274dba30751c22822c0d226f3de670b734f;hb=e90f0536f9be39ada0bef0aeb0d275dec3b2fb5b;hp=0000000000000000000000000000000000000000;hpb=a8c9e8a7ca320ab0df5fd32e717fd62cd7635ce6;p=lilypond.git diff --git a/scripts/auxiliar/update-patch-version.sh b/scripts/auxiliar/update-patch-version.sh new file mode 100755 index 0000000000..22286274db --- /dev/null +++ b/scripts/auxiliar/update-patch-version.sh @@ -0,0 +1,24 @@ +#! /bin/bash +# +# Update the version number in lilypond snippets without running convert-ly +# on the snippets +# Note: this does not change anything but the version number, and it will only +# change the specified version number +# +# This is useful when a patch containing a number of snippets (due to a change +# in syntax) has not completed review before a new development release +# is made. +# +# Usage: update-patch-version old-version new-version + +if [ $# -ne 2 ] # need exactly 2 arguments +then + echo "Usage: update-patch-version old-version new-version" + exit 1 +fi + +echo "Warning -- if this script is run after a branch is rebased," +echo " unintended changes will occur. It would be best to revert" +echo " the rebase commit before running." + +git grep --name-only $1 | xargs sed -i -e s/$1/$2/g