improved replacement
This commit is contained in:
parent
dc0253788a
commit
50441d00bc
@ -16,16 +16,29 @@ fi
|
||||
git -C ~/chromium/src/ format-patch -1 --keep-subject --stdout --full-index --zero-commit --no-signature $patch >~/bromite/build/patches-new/$PATCH_FILE
|
||||
echo " exported"
|
||||
|
||||
CHANGE_REF=""
|
||||
while read line; do
|
||||
#echo $line
|
||||
for i in {1..5}
|
||||
do
|
||||
if [[ "$line" == index* ]]; then
|
||||
next_line=$(grep -A1 "${line}" ~/bromite/build/patches-new/$PATCH_FILE | tail -n 1 )
|
||||
read next_line
|
||||
if [[ "$next_line" != "GIT binary patch" ]]; then
|
||||
sed -i "/^$line/d" ~/bromite/build/patches-new/$PATCH_FILE
|
||||
CHANGE_REF=${CHANGE_REF}"/^${line}/d;"
|
||||
break
|
||||
else
|
||||
line=$next_line
|
||||
continue
|
||||
fi
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
done <~/bromite/build/patches-new/$PATCH_FILE
|
||||
|
||||
if [ "$CHANGE_REF" ]
|
||||
then
|
||||
sed -i "$CHANGE_REF" ~/bromite/build/patches-new/$PATCH_FILE
|
||||
fi
|
||||
sed -i '/^From 0000000000000000000000000000000000000000/d' ~/bromite/build/patches-new/$PATCH_FILE
|
||||
sed -i '/^FILE:/d' ~/bromite/build/patches-new/$PATCH_FILE
|
||||
sed -i '/^ mode change/d' ~/bromite/build/patches-new/$PATCH_FILE
|
||||
|
Loading…
Reference in New Issue
Block a user