Update create-from-patch.sh
This commit is contained in:
parent
53605d6156
commit
9fc297d1b0
@ -22,11 +22,11 @@ HEAD=$(sed -n '1,/---/ p' $PATCH | sed '/^---/d')
|
|||||||
CONTENT=$(git -C ~/chromium/src/ diff --cached --binary)
|
CONTENT=$(git -C ~/chromium/src/ diff --cached --binary)
|
||||||
|
|
||||||
PATCH_FILE=$PATCH_NEW_PATH/$(basename $PATCH)
|
PATCH_FILE=$PATCH_NEW_PATH/$(basename $PATCH)
|
||||||
rm $PATCH_FILE
|
test -f $PATCH_FILE && rm $PATCH_FILE
|
||||||
echo "$HEAD" >$PATCH_FILE
|
echo "$HEAD" >$PATCH_FILE
|
||||||
|
|
||||||
NEWLINE=$(tail -n 1 "$PATCH_FILE")
|
NEWLINE=$(tail -n 1 "$PATCH_FILE")
|
||||||
echo $NEWLINE
|
#echo $NEWLINE
|
||||||
if [[ "$NEWLINE" == Subject:* ]]; then
|
if [[ "$NEWLINE" == Subject:* ]]; then
|
||||||
echo "" >>$PATCH_FILE
|
echo "" >>$PATCH_FILE
|
||||||
else
|
else
|
||||||
@ -51,6 +51,9 @@ OK=1
|
|||||||
git am $PATCH_FILE || OK=0
|
git am $PATCH_FILE || OK=0
|
||||||
|
|
||||||
if [[ OK -eq 0 ]]; then
|
if [[ OK -eq 0 ]]; then
|
||||||
|
if [ -n "$SILENT" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo "---> Failed to apply. Press return"
|
echo "---> Failed to apply. Press return"
|
||||||
read -n 1
|
read -n 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user