Browse Source

Inhance progressbar

pull/2/head
Ali Hatami Tajik 2 years ago
parent
commit
f8898b464f
  1. 4
      setup.sh
  2. 10
      src/scripts/utils/progressbar.sh

4
setup.sh

@ -15,6 +15,7 @@ while getopts 'v' OPTION; do
esac
done
enable_trapping
draw_progress_bar 0
log '.: Setting up sono-os v0.1.0 :.'
@ -39,4 +40,5 @@ log 'Copying rules to udev ...'
# TODO
sleep 1
draw_progress_bar 100
draw_progress_bar 100
destroy_scroll_area

10
src/scripts/utils/progressbar.sh

@ -1,16 +1,6 @@
#!/bin/bash
# https://github.com/pollev/bash_progress_bar - See license at end of file
# Usage:
# Source this script
# enable_trapping <- optional to clean up properly if user presses ctrl-c
# setup_scroll_area <- create empty progress bar
# draw_progress_bar 10 <- advance progress bar
# draw_progress_bar 40 <- advance progress bar
# block_progress_bar 45 <- turns the progress bar yellow to indicate some action is requested from the user
# draw_progress_bar 90 <- advance progress bar
# destroy_scroll_area <- remove progress bar
# Constants
CODE_SAVE_CURSOR="\033[s"
CODE_RESTORE_CURSOR="\033[u"

Loading…
Cancel
Save