tazpkg rev 202
Install non-free depends via get-*
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 17 16:06:36 2008 +0000 (2008-11-17) |
parents | 4ed1087d5b4c |
children | bdc5253ca4a8 |
files | tazpkg |
line diff
1.1 --- a/tazpkg Fri Nov 14 11:04:02 2008 +0000 1.2 +++ b/tazpkg Mon Nov 17 16:06:36 2008 +0000 1.3 @@ -250,11 +250,14 @@ 1.4 check_for_package_in_list() 1.5 { 1.6 local filename 1.7 + local check_only 1.8 + check_only="$1" 1.9 filename=$(get_package_filename $PACKAGE) 1.10 if [ -n "$filename" ]; then 1.11 PACKAGE=$filename 1.12 else 1.13 echo -e "\nUnable to find : $PACKAGE in the mirrored packages list.\n" 1.14 + [ -n "$check_only" ] && return 1 1.15 exit 0 1.16 fi 1.17 } 1.18 @@ -1826,7 +1829,6 @@ 1.19 check_root 1.20 check_for_package_on_cmdline 1.21 check_for_packages_list 1.22 - check_for_package_in_list 1.23 DO_CHECK="" 1.24 while [ -n "$3" ]; do 1.25 case "$3" in 1.26 @@ -1846,6 +1848,16 @@ 1.27 esac 1.28 shift 1.29 done 1.30 + AUTOEXEC="no" 1.31 + if ! check_for_package_in_list check; then 1.32 + PACKAGE=get-$PACKAGE 1.33 + AUTOEXEC=$PACKAGE 1.34 + check_for_package_in_list 1.35 + if [ -n "$(get_installed_package_pathname $PACKAGE $ROOT)" ]; then 1.36 + $AUTOEXEC $ROOT 1.37 + exit 0 1.38 + fi 1.39 + fi 1.40 # Check if forced install. 1.41 if [ "$DO_CHECK" = "no" ]; then 1.42 rm -f $CACHE_DIR/$PACKAGE.tazpkg 1.43 @@ -1866,6 +1878,7 @@ 1.44 fi 1.45 PACKAGE_FILE=$CACHE_DIR/$PACKAGE.tazpkg 1.46 install_package $ROOT 1.47 + [ "$AUTOEXEC" != "no" ] && $PACKAGE $ROOT 1.48 ;; 1.49 clean-cache) 1.50 # Remove all downloaded packages.