Loading src/install.sh +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ rm -f "$TMP" MSG="Downloading $BASE..." info "$MSG" && html "$MSG" /run/progress.sh "$TMP" "Downloading $BASE ([P])..." & /run/progress.sh "$TMP" "" "Downloading $BASE ([P])..." & { wget "$BOOT" -O "$TMP" -q --no-check-certificate --show-progress "$PROGRESS"; rc=$?; } || : fKill "progress.sh" Loading src/progress.sh +8 −2 Original line number Diff line number Diff line Loading @@ -12,7 +12,8 @@ escape () { } file="$1" body=$(escape "$2") total="$2" body=$(escape "$3") info="/run/shm/msg.html" if [[ "$body" == *"..." ]]; then Loading @@ -24,7 +25,12 @@ do if [ -s "$file" ]; then bytes=$(du -sb "$file" | cut -f1) if (( bytes > 1000 )); then size=$(echo "$bytes" | numfmt --to=iec --suffix=B | sed -r 's/([A-Z])/ \1/') if [ -z "$total" ]; then size=$(numfmt --to=iec --suffix=B "$bytes" | sed -r 's/([A-Z])/ \1/') else size=$(printf '%.1f\n' "$(($bytes*100*100/$total))e-2") size="$size%" fi echo "${body//(\[P\])/($size)}"> "$info" fi fi Loading Loading
src/install.sh +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ rm -f "$TMP" MSG="Downloading $BASE..." info "$MSG" && html "$MSG" /run/progress.sh "$TMP" "Downloading $BASE ([P])..." & /run/progress.sh "$TMP" "" "Downloading $BASE ([P])..." & { wget "$BOOT" -O "$TMP" -q --no-check-certificate --show-progress "$PROGRESS"; rc=$?; } || : fKill "progress.sh" Loading
src/progress.sh +8 −2 Original line number Diff line number Diff line Loading @@ -12,7 +12,8 @@ escape () { } file="$1" body=$(escape "$2") total="$2" body=$(escape "$3") info="/run/shm/msg.html" if [[ "$body" == *"..." ]]; then Loading @@ -24,7 +25,12 @@ do if [ -s "$file" ]; then bytes=$(du -sb "$file" | cut -f1) if (( bytes > 1000 )); then size=$(echo "$bytes" | numfmt --to=iec --suffix=B | sed -r 's/([A-Z])/ \1/') if [ -z "$total" ]; then size=$(numfmt --to=iec --suffix=B "$bytes" | sed -r 's/([A-Z])/ \1/') else size=$(printf '%.1f\n' "$(($bytes*100*100/$total))e-2") size="$size%" fi echo "${body//(\[P\])/($size)}"> "$info" fi fi Loading