# HG changeset patch # User Christophe Lincoln # Date 1337956518 -7200 # Node ID f59ca5e10f5ee30ae092bd48fb8eb8cb627b3758 # Parent 59147c9f511307217b072885a813bfada7bb4026 spk-up: check_root diff -r 59147c9f5113 -r f59ca5e10f5e spk-up --- a/spk-up Fri May 25 16:19:11 2012 +0200 +++ b/spk-up Fri May 25 16:35:18 2012 +0200 @@ -47,7 +47,6 @@ # Recharges all list from one mirror or all mirrors recharge_lists() { - check_root newline boldify $(gettext "Updating packages lists") separator @@ -186,13 +185,15 @@ do case "$arg" in *usage|*help) usage ;; - --list) - recharge_lists + --list) + check_root + recharge_lists newline && exit 0 ;; --*) continue ;; *) - pkg=$arg + pkg="$arg" system=no + check_root [ "$count" == 0 ] && up_headers if [ -f "$installed/$pkg/receipt" ]; then count=$(($count +1)) @@ -227,6 +228,7 @@ build_count=0 blocked_count=0 +check_root recharge_lists up_headers cd $installed