Skip to content

Instantly share code, notes, and snippets.

@KushtrimPacaj
Last active July 26, 2019 13:49

Revisions

  1. KushtrimPacaj revised this gist Jul 26, 2019. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions generateAospPatchScript.sh
    Original file line number Diff line number Diff line change
    @@ -12,4 +12,7 @@ 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
    }

  2. KushtrimPacaj revised this gist Jul 24, 2019. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions generateAospPatchScript.sh
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,15 @@
    function generateAospPatchScript(){
    echo ". build/envsetup.sh > /dev/null" > applyPatches.sh

    find . -type f -name "*.patch" -exec sh -c '\
    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 < $rName\n\
    patch -p1 --no-backup-if-mismatch < $rName\n\
    croot > /dev/null\n\
    echo \"---------------------------------\"\n\n"' \; >> applyPatches.sh
    }

  3. KushtrimPacaj renamed this gist Jul 24, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. KushtrimPacaj created this gist Jul 24, 2019.
    16 changes: 16 additions & 0 deletions generateAospPatchScript
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    function generateAospPatchScript(){
    echo ". build/envsetup.sh > /dev/null" > applyPatches.sh

    find . -type f -name "*.patch" -exec 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 < $rName\n\
    croot > /dev/null\n\
    echo \"---------------------------------\"\n\n"' \; >> applyPatches.sh
    }