Hard fail on error

Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2021-10-16 15:28:15 -04:00
parent a5cdb9ab58
commit 256b1db98b
29 changed files with 105 additions and 65 deletions

View file

@ -14,6 +14,7 @@
#
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <https://www.gnu.org/licenses/>.
set -euo pipefail;
#Changes various default settings
#Last verified: 2018-04-27
@ -56,4 +57,4 @@ sed -i 's/ro.config.alarm_alert=Hassium.ogg/ro.config.alarm_alert=Alarm_Buzzer.o
fi;
cd "$DOS_BUILD_BASE";
echo "Default settings changed!";
echo -e "\e[0;32m[SCRIPT COMPLETE] Default settings changed\e[0m";

View file

@ -24,7 +24,7 @@ export -f patchAllKernels;
resetWorkspace() {
umask 0022;
repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync --detach;
repo forall -c 'git add -A && git reset --hard' && rm -rf out DOS_PATCHED_FLAG && repo sync -j8 --force-sync --detach;
}
export -f resetWorkspace;
@ -94,6 +94,8 @@ export -f buildAll;
patchWorkspace() {
umask 0022;
cd "$DOS_BUILD_BASE$1";
touch DOS_PATCHED_FLAG;
if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/cm"; fi;
source build/envsetup.sh;
#repopick -it bt-sbc-hd-dualchannel-nougat;
@ -102,15 +104,15 @@ patchWorkspace() {
repopick -it n-asb-2021-10;
repopick -it tzdb2021c_N;
source "$DOS_SCRIPTS/Patch.sh";
source "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
source "$DOS_SCRIPTS/Defaults.sh";
source "$DOS_SCRIPTS/Rebrand.sh";
source "$DOS_SCRIPTS/Theme.sh";
source "$DOS_SCRIPTS_COMMON/Optimize.sh";
source "$DOS_SCRIPTS_COMMON/Deblob.sh";
source "$DOS_SCRIPTS_COMMON/Patch_CVE.sh";
source "$DOS_SCRIPTS_COMMON/Post.sh";
sh "$DOS_SCRIPTS/Patch.sh";
sh "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
sh "$DOS_SCRIPTS/Defaults.sh";
sh "$DOS_SCRIPTS/Rebrand.sh";
sh "$DOS_SCRIPTS/Theme.sh";
sh "$DOS_SCRIPTS_COMMON/Optimize.sh";
sh "$DOS_SCRIPTS_COMMON/Deblob.sh";
sh "$DOS_SCRIPTS_COMMON/Patch_CVE.sh";
sh "$DOS_SCRIPTS_COMMON/Post.sh";
source build/envsetup.sh;
}
export -f patchWorkspace;

View file

@ -14,6 +14,7 @@
#
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <https://www.gnu.org/licenses/>.
set -euo pipefail;
#Last verified: 2018-04-27
@ -430,3 +431,4 @@ sed -i 's/^YYLTYPE yylloc;/extern YYLTYPE yylloc;/' kernel/*/*/scripts/dtc/dtc-l
#
#END OF DEVICE CHANGES
#
echo -e "\e[0;32m[SCRIPT COMPLETE] Primary patching finished\e[0m";

View file

@ -14,6 +14,7 @@
#
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <https://www.gnu.org/licenses/>.
set -euo pipefail;
#Updates select user facing strings
#Last verified: 2018-04-27
@ -68,4 +69,4 @@ rm -rf bootanimation;
fi;
cd "$DOS_BUILD_BASE";
echo "Rebranding complete!";
echo -e "\e[0;32m[SCRIPT COMPLETE] Rebranding complete\e[0m";

View file

@ -14,6 +14,7 @@
#
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <https://www.gnu.org/licenses/>.
set -euo pipefail;
#Replaces teal accents with orange/yellow ones
#Last verified: 2018-04-27
@ -61,4 +62,4 @@ mogrify -format png -fill "#$DOS_THEME_500" -opaque "#26a69a" -fuzz 10% java/res
fi;
cd "$DOS_BUILD_BASE";
echo "Applied theme!";
echo -e "\e[0;32m[SCRIPT COMPLETE] Applied theme\e[0m";