Update apply-single-patch.sh
This commit is contained in:
parent
9d611cc535
commit
53605d6156
@ -34,7 +34,7 @@ if [[ OK -eq 0 ]]; then
|
|||||||
done
|
done
|
||||||
|
|
||||||
for file in $(find . -name *.rej); do
|
for file in $(find . -name *.rej); do
|
||||||
echo "---Found: $file" | tee -a ${LOG_FILE};
|
echo " Found: $file" | tee -a ${LOG_FILE};
|
||||||
git add ${file::-4}
|
git add ${file::-4}
|
||||||
OK=0
|
OK=0
|
||||||
done
|
done
|
||||||
@ -42,11 +42,14 @@ if [[ OK -eq 0 ]]; then
|
|||||||
if [[ OK -eq 0 ]]; then
|
if [[ OK -eq 0 ]]; then
|
||||||
DOBUILD=1
|
DOBUILD=1
|
||||||
echo "Current patch $PATCH" | tee -a ${LOG_FILE}
|
echo "Current patch $PATCH" | tee -a ${LOG_FILE}
|
||||||
echo "Patch not apply cleanly. Please fix... (next phase: build)" | tee -a ${LOG_FILE}
|
echo " Patch not apply cleanly. Please fix..." | tee -a ${LOG_FILE}
|
||||||
echo "Press return"
|
if [ -n "$SILENT" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo " Press return"
|
||||||
read -n 1
|
read -n 1
|
||||||
else
|
else
|
||||||
echo "Patch not apply cleanly. Wiggle done!" | tee -a ${LOG_FILE}
|
echo " Patch not apply cleanly. Wiggle done!" | tee -a ${LOG_FILE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " Deleting rej"
|
echo " Deleting rej"
|
||||||
@ -65,21 +68,21 @@ if [[ DOBUILD -eq 1 ]]; then
|
|||||||
#autoninja -C out/arm64 chrome_public_apk && OK=1
|
#autoninja -C out/arm64 chrome_public_apk && OK=1
|
||||||
#date "+%Y%m%d %H.%M.%S" | tee -a ${LOG_FILE}
|
#date "+%Y%m%d %H.%M.%S" | tee -a ${LOG_FILE}
|
||||||
|
|
||||||
#DOEXPORT=1
|
DOEXPORT=1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ OK -eq 0 ]]; then
|
if [[ OK -eq 0 ]]; then
|
||||||
|
if [ -z "$SILENT" ]; then
|
||||||
echo "Read to add $PATCH. Press return"
|
echo "Read to add $PATCH. Press return"
|
||||||
read -n 1
|
read -n 1
|
||||||
|
fi
|
||||||
DOEXPORT=1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ DOEXPORT -eq 1 ]]; then
|
if [[ DOEXPORT -eq 1 ]]; then
|
||||||
until false
|
until false
|
||||||
do
|
do
|
||||||
bash ~/bromite-buildtools/create-from-patch.sh $PATCH $2
|
bash ~/bromite-buildtools/create-from-patch.sh $PATCH $2 || exit 1
|
||||||
|
|
||||||
rm /tmp/1 /tmp/2 || true
|
rm /tmp/1 /tmp/2 || true
|
||||||
lsdiff $PATCH >/tmp/1
|
lsdiff $PATCH >/tmp/1
|
||||||
@ -89,9 +92,13 @@ if [[ DOEXPORT -eq 1 ]]; then
|
|||||||
git reset HEAD^
|
git reset HEAD^
|
||||||
diff /tmp/1 /tmp/2
|
diff /tmp/1 /tmp/2
|
||||||
echo "Some files are missing. Check again." | tee -a ${LOG_FILE}
|
echo "Some files are missing. Check again." | tee -a ${LOG_FILE}
|
||||||
|
if [ -n "$SILENT" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
read -r -p "y to continue [y/N] " response
|
read -r -p "y to continue [y/N] " response
|
||||||
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
bash ~/bromite-buildtools/create-from-patch.sh $PATCH $2
|
bash ~/bromite-buildtools/create-from-patch.sh $PATCH $2 || exit 1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
bash
|
bash
|
||||||
|
Loading…
Reference in New Issue
Block a user