From c9e4374c2f073a17dd17c2f7c9b08e70e19d565c Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Thu, 8 Dec 2022 16:06:23 +0800 Subject: [PATCH] Download GApps by Android version (#280) --- .gitattributes | 1 + scripts/build.sh | 40 ++++++++++++++++++++++++----------- scripts/extractMagisk.py | 2 +- scripts/extractWSA.py | 14 ++++++------ scripts/fixGappsProp.py | 2 +- scripts/generateGappsLink.py | 17 ++++++--------- scripts/generateMagiskLink.py | 2 +- scripts/generateWSALinks.py | 8 ++++++- 8 files changed, 52 insertions(+), 34 deletions(-) diff --git a/.gitattributes b/.gitattributes index 273764a..9490f39 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ +*.py text eol=lf *.sh text eol=lf *.exe binary *.apk binary diff --git a/scripts/build.sh b/scripts/build.sh index 0e6935a..c250821 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -42,6 +42,10 @@ SUDO="$(which sudo 2>/dev/null)" if [ -z "$SUDO" ]; then unset SUDO fi +WSA_WORK_ENV="${WORK_DIR:?}"/ENV +if [ -f "$WSA_WORK_ENV" ]; then rm -f "${WSA_WORK_ENV:?}"; fi +touch "$WSA_WORK_ENV" +export WSA_WORK_ENV umount_clean() { if [ -d "$MOUNT_DIR" ]; then echo "Cleanup Work Directory" @@ -88,7 +92,7 @@ abort() { } trap abort INT TERM -function Gen_Rand_Str { +Gen_Rand_Str() { tr -dc 'a-zA-Z0-9'