Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- . progress.sh
- TMP=/media/ramdisk/log_$(date +%y%m%d%H%M%S%3N)
- PROGRESS_R1=" "
- PROGRESS_ML=9
- PROGRESS_FT=D
- PROGRESS_TPOS=T
- PROGRESS_MAX1=1000
- PROGRESS_TC=5
- COUNT=0
- PROGRESS_BAR
- [ -z "${1##*[!0-9]*}" ] || PROGRESS_MAX1=$1
- wait.sh $PROGRESS_MAX1 > $TMP &
- while [ $((COUNT=$COUNT+1)) -lt $PROGRESS_NLIN ]; do echo; done
- printf Progress:"\033["$(($PROGRESS_NLIN-1))"A\r"
- while [ -n "$(pgrep wait.sh)" ]; do
- sleep 0.05s
- if ! PROGRESS_BAR $(tail -c$((${#PROGRESS_MAX1}+2)) $TMP | sed 's/[^0-9]*//g'); then
- echo "ERROR!"
- exit 1
- fi
- done
- PROGRESS_BAR $PROGRESS_MAX1
- rm -f $TMP
- #while [ $((COUNT=$COUNT-1)) -eq 0 ]; do echo; done
- printf "\033["$PROGRESS_NLIN"B\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement