diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-12-01 15:24:50 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-12-01 15:24:50 -0800 |
commit | b4ed443fc05c38067ab33346156f6903732f9419 (patch) | |
tree | 838b3db753ffa753ddc3058a9028a49d2acbceb7 | |
parent | 78e2486746e9ab788895bea941beeace7e11dc10 (diff) | |
download | vyatta-cfg-system-b4ed443fc05c38067ab33346156f6903732f9419.tar.gz vyatta-cfg-system-b4ed443fc05c38067ab33346156f6903732f9419.zip |
Speed up install-system progress bar
The progress bar for copy files is nice but slows down the install
because it updates too often
-rwxr-xr-x | scripts/install-system | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/install-system b/scripts/install-system index adda7339..17adb98c 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -899,7 +899,7 @@ create_partitions() { copy_filesystem() { cp -r -v --preserve=all "$@" | awk '{ ++files - if ((files % 10) == 0) { + if ((files % 100) == 0) { percent = files / total_files * 100 printf "%3d%% [", percent for (i=0;i<percent; i+=2) @@ -908,6 +908,7 @@ copy_filesystem() { for (;i<100;i+=2) printf " " printf "]\r" + fflush() } }' total_files=$(find "$@" | wc -l) } |