summaryrefslogtreecommitdiffstats
path: root/init.d
diff options
context:
space:
mode:
authorncopa <ncopa@f176ef85-8d20-0410-844a-e957b5a1c371>2008-09-10 14:25:53 +0000
committerncopa <ncopa@f176ef85-8d20-0410-844a-e957b5a1c371>2008-09-10 14:25:53 +0000
commit3ca9e49d066fe6863c829b1dd7d8cab3426d6232 (patch)
tree4db5761427416a68af7d183acf7a85f43f2798e3 /init.d
parentf30d5fa6bafe33e71c4d86ab09f02c41c24ec5cd (diff)
downloadalpine-baselayout-3ca9e49d066fe6863c829b1dd7d8cab3426d6232.tar.bz2
alpine-baselayout-3ca9e49d066fe6863c829b1dd7d8cab3426d6232.tar.xz
use a cute roller instead of dots when installing packages
Diffstat (limited to 'init.d')
-rwxr-xr-xinit.d/runtimes15
1 files changed, 11 insertions, 4 deletions
diff --git a/init.d/runtimes b/init.d/runtimes
index 9aae170..e6305a2 100755
--- a/init.d/runtimes
+++ b/init.d/runtimes
@@ -78,16 +78,23 @@ readahead_pkgs() {
readahead $pkgs 2>/dev/null &
}
+roller() {
+ awk 'BEGIN {
+ i=0; split("\\ | / -", a, " ");
+ printf " ";
+ }
+ { printf "\b" a[and(i++,3)+1] }
+ END { printf "\b" }'
+}
+
load_pkgs_from_list() {
local list="$1"
local prompt="$2"
local pkgs dummy
- apk_fetch -u -q
+# apk_fetch -u -q
pkgs=$( sed 's/\#.*//' "$list" )
readahead_pkgs $pkgs
- IGNORE_ERRORS=yes apk_add $pkgs 2>&1 | grep ^ins | while read dummy; do
- echo -n '.'
- done
+ IGNORE_ERRORS=yes apk_add -v $pkgs 2>&1 | roller
}
load_pkgs() {