Skip to content

Commit

Permalink
fix aria2c download
Browse files Browse the repository at this point in the history
  • Loading branch information
honjow committed May 25, 2024
1 parent 59a51b5 commit 7109155
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions __frzr-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -613,15 +613,19 @@ main() {
fi

if [[ -x "$(command -v aria2c)" ]];then
IMG_PATH=
if [ $FRZR_STEAM_PROGRESS -eq 1 ]; then
aria2c --connect-timeout=10 --file-allocation=none -x 16 -s 16 --console-log-level=warn --stderr=true \
-o "${IMG_FILE}" "${IMG_URL}" 2>&1 | grep --line-buffered -oP '\d+(?=%)' | clean_progress 91 %
aria2c --connect-timeout=10 --file-allocation=none -x 16 -s 16 \
--console-log-level=warn --stderr=true -o "${FILE_NAME}" -d "${MOUNT_PATH}" "${IMG_URL}" 2>&1 | \
grep --line-buffered -oP '\d+(?=%)' | clean_progress 91 %
elif [ -z ${SHOW_UI} ]; then
echo "downloading ${NAME}..."
aria2c --connect-timeout=10 --file-allocation=none -x 16 -s 16 --console-log-level=warn -o "${IMG_FILE}" "${IMG_URL}"
aria2c --connect-timeout=10 --file-allocation=none -x 16 -s 16 \
--console-log-level=warn -o "${FILE_NAME}" -d "${MOUNT_PATH}" "${IMG_URL}"
else
aria2c --connect-timeout=10 --file-allocation=none -x 16 -s 16 --console-log-level=warn --stderr=true \
-o "${IMG_FILE}" "${IMG_URL}" 2>&1 | grep --line-buffered -oP '\d+(?=%)' | clean_progress 100 | \
aria2c --connect-timeout=10 --file-allocation=none -x 16 -s 16 \
--console-log-level=warn --stderr=true -o "${FILE_NAME}" -d "${MOUNT_PATH}" "${IMG_URL}" 2>&1 | \
grep --line-buffered -oP '\d+(?=%)' | clean_progress 100 | \
whiptail --gauge "下载系统镜像 (${NAME})" 10 50 0
fi
else
Expand Down

0 comments on commit 7109155

Please sign in to comment.