tazpkg rev 585

let install more than one package at once: tazpkg -gi pkg1 pkg2 pkg3 --opt1 --opt2
author Christophe Lincoln <pankso@slitaz.org>
date Thu Apr 12 17:18:55 2012 +0200 (2012-04-12)
parents 0c7e4875ea3c
children 8fbdfe3d61ea
files tazpkg
line diff
     1.1 --- a/tazpkg	Thu Apr 12 16:59:05 2012 +0200
     1.2 +++ b/tazpkg	Thu Apr 12 17:18:55 2012 +0200
     1.3 @@ -175,8 +175,10 @@
     1.4  		fi
     1.5  		if [ "$get_option" = "${get_option/=}" ]; then
     1.6  			export $get_option=yes
     1.7 +			export opts="$opts --$get_option"
     1.8  		else
     1.9  			export $get_option
    1.10 +			export opts="$opts --$get_option"
    1.11  		fi
    1.12  	done
    1.13  }
    1.14 @@ -2699,6 +2701,16 @@
    1.15  		get_options_list="root forced list rootconfig"
    1.16  		get_options
    1.17  		
    1.18 +		# Install all pkgs specified in argument.
    1.19 +		for arg in $@
    1.20 +		do
    1.21 +			case $arg in
    1.22 +				-*|get-install) continue ;;
    1.23 +				*) tazpkg -gi $arg $opts ;;
    1.24 +			esac
    1.25 +		done
    1.26 +		exit 0
    1.27 +		
    1.28  		DO_CHECK=""
    1.29  		[ "$forced" ] && DO_CHECK=no
    1.30  		[ "$root" ] && ROOT="$root" && check_base_dir "$root"