off-line -> offline

This commit is contained in:
Howard Wu 2022-08-29 16:47:59 +08:00
parent 3eaeeae198
commit 741c7fe611
2 changed files with 10 additions and 10 deletions

View File

@ -39,7 +39,7 @@ CLEAN_DOWNLOAD_MAGISK=0
CLEAN_DOWNLOAD_GAPPS=0
REMOVE_AMAZON="keep"
COMPRESS_OUTPUT="no"
OFF_LINE=0
OFFLINE=0
umount_clean(){
echo "Cleanup Work Directory"
if [ -d "$MOUNT_DIR" ]; then
@ -97,7 +97,7 @@ usage(){
--root-sol
--remove-amazon
--compress
--off-line
--offline
--magisk-custom
--debug
"
@ -113,7 +113,7 @@ ARGUMENT_LIST=(
"root-sol:"
"remove-amazon"
"compress"
"off-line"
"offline"
"magisk-custom"
"debug"
)
@ -136,7 +136,7 @@ while [[ $# -gt 0 ]]; do
--remove-amazon ) REMOVE_AMAZON="remove"; shift ;;
--root-sol ) ROOT_SOL="$2"; shift 2 ;;
--compress ) COMPRESS_OUTPUT="yes"; shift ;;
--off-line ) OFF_LINE="1"; shift ;;
--offline ) OFFLINE="1"; shift ;;
--debug ) DEBUG="1"; shift ;;
--magisk-custom ) CUSTOM_MAGISK="1"; shift ;;
-- ) shift; break;;
@ -165,7 +165,7 @@ else
GAPPS_PATH="$DOWNLOAD_DIR"/MindTheGapps-"$ARCH".zip
fi
if [ "$OFF_LINE" != "1" ]; then
if [ "$OFFLINE" != "1" ]; then
trap 'rm -f -- "${DOWNLOAD_DIR:?}/${DOWNLOAD_CONF_NAME}"' EXIT
echo "Generate Download Links"
python3 generateWSALinks.py "$ARCH" "$RELEASE_TYPE" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
@ -185,7 +185,7 @@ if [ "$OFF_LINE" != "1" ]; then
fi
else
if [ ! -f "$WSA_ZIP_PATH" ] || [ ! -f "$MAGISK_PATH" ] || [ ! -f "$GAPPS_PATH" ]; then
echo "Off line: Some of the file missing, please use online mode."
echo "Off line: Some of the file missing, please disable offline mode."
exit 1
fi
fi

View File

@ -142,13 +142,13 @@ else
fi
# if ! (YesNoBox '([title]="Off line mode" [text]="Do you want to enable off line mode?")'); then
# OFF_LINE="--OFF-LINE"
# OFFLINE="--offline"
# else
# OFF_LINE=""
# OFFLINE=""
# fi
# OFF_LINE="--off-line"
# OFFLINE="--offline"
clear
COMMAND_LINE=(--arch "$ARCH" --release-type "$RELEASE_TYPE" --magisk-ver "$MAGISK_VER" --gapps-brand "$GAPPS_BRAND" --gapps-variant "$GAPPS_VARIANT" "$REMOVE_AMAZON" --root-sol "$ROOT_SOL" "$COMPRESS_OUTPUT" "$OFF_LINE" "$DEBUG" "$CUSTOM_MAGISK")
COMMAND_LINE=(--arch "$ARCH" --release-type "$RELEASE_TYPE" --magisk-ver "$MAGISK_VER" --gapps-brand "$GAPPS_BRAND" --gapps-variant "$GAPPS_VARIANT" "$REMOVE_AMAZON" --root-sol "$ROOT_SOL" "$COMPRESS_OUTPUT" "$OFFLINE" "$DEBUG" "$CUSTOM_MAGISK")
echo "COMMAND_LINE=${COMMAND_LINE[*]}"
./build.sh "${COMMAND_LINE[@]}"