# HG changeset patch # User Christophe Lincoln # Date 1208463973 -7200 # Node ID f37cf37b31cdfee7762da783fe40f443e305d9c3 # Parent e0e65dcaa78da34b38835f4d0ccda5c06c43b0bb Recharge automaticaly packages list if root and needed diff -r e0e65dcaa78d -r f37cf37b31cd tazpkg --- a/tazpkg Sun Apr 13 11:39:25 2008 +0000 +++ b/tazpkg Thu Apr 17 22:26:13 2008 +0200 @@ -181,11 +181,15 @@ check_for_packages_list() { if [ ! -f "$LOCALSTATE/packages.list" ]; then - echo -e " + if test $(id -u) = 0 ; then + tazpkg recharge + else + echo -e " Unable to find the list : $LOCALSTATE/packages.list\n You must probably run 'tazpkg recharge' as root to get the last list of packages avalaible on the mirror.\n" - exit 0 + exit 0 + fi fi }