diff options
-rwxr-xr-x | convert-branch.sh | 16 | ||||
-rwxr-xr-x | update-branch.sh | 26 |
2 files changed, 26 insertions, 16 deletions
diff --git a/convert-branch.sh b/convert-branch.sh deleted file mode 100755 index b0e4efc11efc..000000000000 --- a/convert-branch.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -git filter-branch -f --subdirectory-filter trunk -git filter-branch -f --tree-filter 'makepkg --printsrcinfo > .SRCINFO || rm .SRCINFO' --commit-filter ' - if [ -e .SRCINFO ] - then - git commit-tree "$@" - else - shift - while [ -n "$1" ] - do - shift - map "$1" - shift - done - fi' diff --git a/update-branch.sh b/update-branch.sh new file mode 100755 index 000000000000..5c26decb7718 --- /dev/null +++ b/update-branch.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +REMOTE_BRANCH=packages/grub +LOCAL_BRANCH=upstream +CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` + +git checkout "$REMOTE_BRANCH" +git pull +git branch -f "$LOCAL_BRANCH" "$REMOTE_BRANCH" +git checkout "$LOCAL_BRANCH" +git filter-branch -f --subdirectory-filter trunk \ + --tree-filter 'makepkg --printsrcinfo > .SRCINFO || rm .SRCINFO' \ + --commit-filter ' + if [ -e .SRCINFO ] + then + git commit-tree "$@" + else + shift + while [ -n "$1" ] + do + shift + map "$1" + shift + done + fi' +git checkout "$CURRENT_BRANCH" |