Last active
July 26, 2019 13:49
-
-
Save KushtrimPacaj/ca0eb67765af02e6433a288eeba2132c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateAospPatchScript(){ | |
echo ". build/envsetup.sh > /dev/null" > applyPatches.sh | |
find . -type f -name "*.patch" | sort -n | xargs -I '{}' sh -c '\ | |
dName=$(dirname {}) ; \ | |
rName=$(realpath {}) ; \ | |
fName=$(basename $rName); \ | |
echo "\n\ | |
cd $dName\n\ | |
echo \"Entering directory: \$PWD\"\n\ | |
echo \"Applying $fName\"\n\ | |
patch -p1 --no-backup-if-mismatch < $rName\n\ | |
croot > /dev/null\n\ | |
echo \"---------------------------------\"\n\n"' \; >> applyPatches.sh | |
chmod +x applyPatches.sh | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run this in the root of the patches folder.