bromite-buildtools/images/bromite-source/apply-bromite-patches.sh

34 lines
665 B
Bash
Raw Permalink Normal View History

2021-06-19 09:46:24 +00:00
#!/bin/bash
RED='\033[0;31m'
NC='\033[0m' # No Color
2021-07-08 12:51:53 +02:00
sudo apt install sed
2021-06-19 09:46:24 +00:00
cd chromium/src
echo -e ${RED} ------- apply patchs ${NC}
for file in $(cat ../../bromite/build/bromite_patches_list.txt) ; do
2022-03-25 07:26:43 +01:00
if [[ "$file" == *".patch" ]]; then
#if [[ "$file" == *"Automated-domain-substitution"* ]]; then
# echo -e ${RED} " -> Excluding $file" ${NC}
# continue
#fi
2021-06-19 09:46:24 +00:00
echo -e ${RED} " -> Apply $file" ${NC}
2022-03-25 08:58:27 +01:00
REPL="0,/^---/s//FILE:"$(basename $file)"\n---/"
2021-06-19 09:46:24 +00:00
cat ../../bromite/build/patches/$file | sed $REPL | git am
if [ $? -ne 0 ]
then
echo -e "Error on ../../bromite/build/patches/${file}"
exit 1
fi
echo " "
2022-03-25 07:26:43 +01:00
fi
2021-06-19 09:46:24 +00:00
done