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
|
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"
|
echo " exported"
|
||||||
|
|
||||||
|
CHANGE_REF=""
|
||||||
while read line; do
|
while read line; do
|
||||||
#echo $line
|
for i in {1..5}
|
||||||
if [[ "$line" == index* ]]; then
|
do
|
||||||
next_line=$(grep -A1 "${line}" ~/bromite/build/patches-new/$PATCH_FILE | tail -n 1 )
|
if [[ "$line" == index* ]]; then
|
||||||
if [[ "$next_line" != "GIT binary patch" ]]; then
|
read next_line
|
||||||
sed -i "/^$line/d" ~/bromite/build/patches-new/$PATCH_FILE
|
if [[ "$next_line" != "GIT binary patch" ]]; then
|
||||||
|
CHANGE_REF=${CHANGE_REF}"/^${line}/d;"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
line=$next_line
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
done <~/bromite/build/patches-new/$PATCH_FILE
|
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 '/^From 0000000000000000000000000000000000000000/d' ~/bromite/build/patches-new/$PATCH_FILE
|
||||||
sed -i '/^FILE:/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
|
sed -i '/^ mode change/d' ~/bromite/build/patches-new/$PATCH_FILE
|
||||||
|
Loading…
Reference in New Issue
Block a user