diff options
author | Denton Liu | 2018-06-02 01:14:49 -0400 |
---|---|---|
committer | Denton Liu | 2018-06-02 17:01:56 -0400 |
commit | ae39d1e28b7e7d1c8cd0aef00bee7895cbeb13d4 (patch) | |
tree | 3474b945944e04d220bd0a832341b84f65cf1909 /update-branch.sh | |
parent | fd72468445bac4f5b2c83cec4e4d93d8948d93e2 (diff) | |
download | aur-ae39d1e28b7e7d1c8cd0aef00bee7895cbeb13d4.tar.gz |
Initial commit
Diffstat (limited to 'update-branch.sh')
-rwxr-xr-x | update-branch.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/update-branch.sh b/update-branch.sh new file mode 100755 index 000000000000..7326e37949d0 --- /dev/null +++ b/update-branch.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +REMOTE_BRANCH=packages/ddclient +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" |