Last active
November 3, 2023 23:06
-
-
Save kraj/9fd27c8763aaa2943e1790d714bacee0 to your computer and use it in GitHub Desktop.
Apply AUH generated patches from patchwork
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 1 ]; then | |
echo "specify atleast one patch ID from patchwork" | |
echo "$0 <pnum1> <pnum2> ..." | |
exit | |
fi | |
i=1; | |
j=$#; | |
while [ $i -le $j ] | |
do | |
echo "Applying patch ID - $1"; | |
git-pw patch download $1 - | sed '0,/^-- >8 --$/d' | git am -s | |
if [$? != 0]; then | |
git am --abort | |
else | |
git commit -s --reset-author --amend -C HEAD | |
fi | |
i=$((i + 1)); | |
shift 1; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment