spk rev 36
spk: small improvments
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 15 21:57:13 2012 +0200 (2012-05-15) |
parents | d703999f686b |
children | 70c2d1ac2887 |
files | spk spk-rm |
line diff
1.1 --- a/spk Tue May 15 21:11:07 2012 +0200 1.2 +++ b/spk Tue May 15 21:57:13 2012 +0200 1.3 @@ -30,7 +30,7 @@ 1.4 --rm $(gettext "Remove installed packages") 1.5 --block $(gettext "Add packages to the blocked list") 1.6 --unblock $(gettext "Remove packages from the blocked list") 1.7 - --root $(gettext "Set the root file system path") 1.8 + --root= $(gettext "Set the root file system path") 1.9 --debug $(gettext "Display some usefull debug information") 1.10 1.11 $(boldify $(gettext "Examples:")) 1.12 @@ -48,20 +48,24 @@ 1.13 case "$1" in 1.14 ""|*usage|*help) usage ;; 1.15 info) 1.16 + cache="$(du -sh $CACHE_DIR | awk '{print $1 " " $2}')" 1.17 newline 1.18 boldify "Spk Info" 1.19 separator 1.20 gettext "Database :"; echo " $installed" 1.21 + gettext "Cache info :"; echo " $cache" 1.22 gettext "Mirror URL :"; echo " $(cat $mirrorurl)" 1.23 count_installed 1.24 count_mirrored 1.25 separator 1.26 newline && exit 0 ;; 1.27 activity) 1.28 + # --head=NB 1.29 + : ${head=18} 1.30 newline 1.31 boldify "Spk Activity" 1.32 separator 1.33 - cat $activity 1.34 + cat $activity | head -n $head 1.35 separator && newline 1.36 exit 0 ;; 1.37 esac
2.1 --- a/spk-rm Tue May 15 21:11:07 2012 +0200 2.2 +++ b/spk-rm Tue May 15 21:57:13 2012 +0200 2.3 @@ -87,8 +87,7 @@ 2.4 fi 2.5 for i in $altered; do 2.6 if [ -d "$installed/$i" ]; then 2.7 - # TODO: use spk-rm 2.8 - echo "spk-rm $i --root=$root" 2.9 + spk-rm $i --root=$root 2.10 fi 2.11 done 2.12 fi