Support refreshing patches

Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2021-10-16 13:51:54 -04:00
parent 52fd9c9ddb
commit f296ec0346
2 changed files with 8 additions and 0 deletions

View File

@ -58,6 +58,13 @@ applyPatchReal() {
firstLine=$(head -n1 "$currentWorkingPatch");
if [[ "$firstLine" = *"Mon Sep 17 00:00:00 2001"* ]] || [[ "$firstLine" = *"Thu Jan 1 00:00:00 1970"* ]]; then
git am "$@";
if [ "$?" -eq 0 ]; then
if [ "$DOS_REFRESH_PATCHES" = true ]; then
if [[ "$currentWorkingPatch" == $DOS_PATCHES* ]]; then
git format-patch -1 HEAD --zero-commit --output="$currentWorkingPatch";
fi;
fi;
fi;
else
git apply "$@";
echo "Applying (as diff): $currentWorkingPatch";

View File

@ -35,6 +35,7 @@ export CCACHE_COMPRESSLEVEL=1;
#export DOS_TOR_WRAPPER="torsocks"; #Uncomment to perform select build operations over Tor
export DOS_MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll()
export DOS_MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options: quick, extra, slow, full
export DOS_REFRESH_PATCHES=true; #Set true to refresh branch-specific patches on apply
#Deblobber
export DOS_DEBLOBBER_REMOVE_ACCESSORIES=true; #Set false to allow use of external accessories that depend on blobs