diff options
author | Erich Eckner <git@eckner.net> | 2020-12-07 14:11:28 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-12-07 14:11:28 +0100 |
commit | 44ee3a3d018cc5402fc40773c672b165355214ab (patch) | |
tree | 23b519c4b12b6e91b09953b029f2730974147e31 /commit-package | |
parent | 9b1d81183a71fc34412e012feaf85d54b7a53921 (diff) | |
download | archlinuxewe-44ee3a3d018cc5402fc40773c672b165355214ab.tar.xz |
commit-package: fix rebase stuff and branches
Diffstat (limited to 'commit-package')
-rwxr-xr-x | commit-package | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/commit-package b/commit-package index 9b50d13aa..70f0229d1 100755 --- a/commit-package +++ b/commit-package @@ -2,6 +2,20 @@ set -e +pdiff () { + local one="$1"; + local two="$2"; + local pipe="$3"; + shift 3; + diff "$@" <( + cat "$one" \ + | bash -c "$pipe" + ) <( + cat "$two" \ + | bash -c "$pipe" + ) +} + unset commit_message if [ $# -eq 1 ]; then commit_message="$1" @@ -34,12 +48,36 @@ if [ -d '.git' ] || [ -f '.git' ]; then makepkg --printsrcinfo > .SRCINFO git commit 'PKGBUILD' '.SRCINFO' -m "${commit_message:-rebuild}" git checkout master - git diff archlinuxewe{^,} \ + diff=$( + git diff archlinuxewe{^,} --name-status \ + | cut -f2 \ + | grep -vxF .SRCINFO \ + | grep -vxF PKGBUILD \ + | xargs -r git diff archlinuxewe{^,} -- + ) + if [ -n "${diff}" ]; then + printf '%s\n' "${diff}" \ + | git apply + fi + pdiff <( + git archive archlinuxewe^ -- PKGBUILD + ) <( + git archive archlinuxewe -- PKGBUILD + ) ' + tar -Ox \ + | sed " + /^_pinned_dependencies=(/,/)/d + " + ' -u \ + | sed ' + s@^\(---\|+++\) /dev/fd/\S\+\s\+@\1 a/PKGBUILD @ + ' \ | git apply + makepkg --printsrcinfo > .SRCINFO git commit 'PKGBUILD' '.SRCINFO' -m "${commit_message:-rebuild}" git push aur git checkout archlinuxewe - git rebase aur + git rebase master git push ecknernet cd .. if [ -n "${commit_message}" ]; then |