mirror of
https://github.com/LSPosed/MagiskOnWSALocal.git
synced 2025-09-01 18:20:14 +00:00
Fix run.sh (#778)
This commit is contained in:
parent
41aec53b2c
commit
8950e28a08
1 changed files with 10 additions and 43 deletions
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with MagiskOnWSALocal. If not, see <https://www.gnu.org/licenses/>.
|
# along with MagiskOnWSALocal. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2023 LSPosed Contributors
|
# Copyright (C) 2024 LSPosed Contributors
|
||||||
#
|
#
|
||||||
|
|
||||||
# DEBUG=--debug
|
# DEBUG=--debug
|
||||||
|
@ -100,45 +100,16 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (YesNoBox '([title]="Install GApps" [text]="Do you want to install GApps?")'); then
|
if (YesNoBox '([title]="Install GApps" [text]="Do you want to install GApps?")'); then
|
||||||
# GAPPS_BRAND=$(
|
INSTALL_GAPPS="--install-gapps"
|
||||||
# Radiolist '([title]="Which GApps do you want to install?"
|
|
||||||
# [default]="MindTheGapps")' \
|
|
||||||
# 'MindTheGapps' "Recommend" 'on' \
|
|
||||||
# 'OpenGApps' "This flavor may cause startup failure" 'off'
|
|
||||||
# )
|
|
||||||
GAPPS_BRAND="MindTheGapps"
|
|
||||||
else
|
else
|
||||||
GAPPS_BRAND="none"
|
INSTALL_GAPPS=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$GAPPS_BRAND" = "OpenGApps" ]; then
|
# if (YesNoBox '([title]="Remove Amazon Appstore" [text]="Do you want to keep Amazon Appstore?")'); then
|
||||||
# TODO: Keep it pico since other variants of opengapps are unable to boot successfully
|
# REMOVE_AMAZON=""
|
||||||
if [ "$DEBUG" = "1" ]; then
|
# else
|
||||||
GAPPS_VARIANT=$(
|
# REMOVE_AMAZON="--remove-amazon"
|
||||||
Radiolist '([title]="Variants of GApps"
|
# fi
|
||||||
[default]="pico")' \
|
|
||||||
'super' "" 'off' \
|
|
||||||
'stock' "" 'off' \
|
|
||||||
'full' "" 'off' \
|
|
||||||
'mini' "" 'off' \
|
|
||||||
'micro' "" 'off' \
|
|
||||||
'nano' "" 'off' \
|
|
||||||
'pico' "" 'on' \
|
|
||||||
'tvstock' "" 'off' \
|
|
||||||
'tvmini' "" 'off'
|
|
||||||
)
|
|
||||||
else
|
|
||||||
GAPPS_VARIANT=""
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
GAPPS_VARIANT=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (YesNoBox '([title]="Remove Amazon Appstore" [text]="Do you want to keep Amazon Appstore?")'); then
|
|
||||||
REMOVE_AMAZON=""
|
|
||||||
else
|
|
||||||
REMOVE_AMAZON="--remove-amazon"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (YesNoBox '([title]="Compress output" [text]="Do you want to compress the output?")'); then
|
if (YesNoBox '([title]="Compress output" [text]="Do you want to compress the output?")'); then
|
||||||
COMPRESS_OUTPUT="--compress"
|
COMPRESS_OUTPUT="--compress"
|
||||||
|
@ -156,8 +127,8 @@ fi
|
||||||
|
|
||||||
clear
|
clear
|
||||||
declare -A RELEASE_TYPE_MAP=(["retail"]="retail" ["release preview"]="RP" ["insider slow"]="WIS" ["insider fast"]="WIF")
|
declare -A RELEASE_TYPE_MAP=(["retail"]="retail" ["release preview"]="RP" ["insider slow"]="WIS" ["insider fast"]="WIF")
|
||||||
COMMAND_LINE=(--arch "$ARCH" --release-type "${RELEASE_TYPE_MAP[$RELEASE_TYPE]}" --root-sol "$ROOT_SOL" --gapps-brand "$GAPPS_BRAND")
|
COMMAND_LINE=(--arch "$ARCH" --release-type "${RELEASE_TYPE_MAP[$RELEASE_TYPE]}" --root-sol "$ROOT_SOL")
|
||||||
CHECK_NULL_LIST=("$REMOVE_AMAZON" "$COMPRESS_OUTPUT" "$OFFLINE" "$DEBUG" "$CUSTOM_MAGISK")
|
CHECK_NULL_LIST=("$INSTALL_GAPPS" "$REMOVE_AMAZON" "$COMPRESS_OUTPUT" "$OFFLINE" "$DEBUG" "$CUSTOM_MAGISK")
|
||||||
for i in "${CHECK_NULL_LIST[@]}"; do
|
for i in "${CHECK_NULL_LIST[@]}"; do
|
||||||
if [ -n "$i" ]; then
|
if [ -n "$i" ]; then
|
||||||
COMMAND_LINE+=("$i")
|
COMMAND_LINE+=("$i")
|
||||||
|
@ -168,10 +139,6 @@ if [ -n "$MAGISK_VER" ]; then
|
||||||
COMMAND_LINE+=(--magisk-ver "$MAGISK_VER")
|
COMMAND_LINE+=(--magisk-ver "$MAGISK_VER")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$GAPPS_VARIANT" ]; then
|
|
||||||
COMMAND_LINE+=(--gapps-variant "$GAPPS_VARIANT")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$COMPRESS_FORMAT" ]; then
|
if [ -n "$COMPRESS_FORMAT" ]; then
|
||||||
COMMAND_LINE+=(--compress-format "$COMPRESS_FORMAT")
|
COMMAND_LINE+=(--compress-format "$COMPRESS_FORMAT")
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue