summaryrefslogtreecommitdiff
path: root/etc/functions/progress
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-08 18:47:25 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-08 18:47:25 +0200
commitda82a60fdbee638601875fbbc4ba8260ed1bf267 (patch)
treec11368a72bd9a888efe51e83ff32ed659ac9b96e /etc/functions/progress
parent99a52ce7a6b7270455c0878e9f368373248a277c (diff)
Cleanup
Diffstat (limited to 'etc/functions/progress')
-rw-r--r--etc/functions/progress27
1 files changed, 0 insertions, 27 deletions
diff --git a/etc/functions/progress b/etc/functions/progress
deleted file mode 100644
index d472e54..0000000
--- a/etc/functions/progress
+++ /dev/null
@@ -1,27 +0,0 @@
-## vim:ft=zsh
-## progress - draw a simple progress bar
-## Usage: progress <current> <max> [left description] [right discription]
-## Copyright (C) 2008 by Daniel Friesel <derf@derf.homelinux.org>
-## License: WTFPL <http://sam.zoy.org/wtfpl>
-
-typeset -i current=$1
-typeset -i max=$2
-typeset desc=$3
-typeset desc2=$4
-typeset output=''
-typeset currentper=$(( (current*100)/max ))
-typeset c a
-function item {
- typeset j
- for j in {0..$1}; {
- (( j > 0 )) && output+=$2
- }
-}
-c=$(( currentper/5 ))
-a=$(( 20-c ))
-output+="$desc ["
-item $c '='
-item $a ' '
-output+="] $currentper% $desc2"
-echo -ne "\r\e[2K"
-echo -ne $output