wok-current diff nvidia/receipt @ rev 9213

nvidia: allow post_install without tty (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 11 09:47:15 2011 +0100 (2011-03-11)
parents 7f93a5930b2d
children a894aa42f46b
line diff
     1.1 --- a/nvidia/receipt	Fri Mar 11 09:31:56 2011 +0100
     1.2 +++ b/nvidia/receipt	Fri Mar 11 09:47:15 2011 +0100
     1.3 @@ -94,18 +94,19 @@
     1.4  	echo "================================================================================"
     1.5  	echo "For installing this package, you have to accept the $PACKAGE license."
     1.6  	echo "The license is stored in /usr/share/licenses/$PACKAGE "    
     1.7 -	echo -n "Would you like to read the license (y/N) : "; read anser
     1.8 -	if [ "$anser" = "y" -a "$(tty)" != "not a tty" ]; then
     1.9 -		more < /usr/share/licenses/"$PACKAGE"/LICENSE
    1.10 -		echo "" 		
    1.11 +	if [ "$(tty)" != "not a tty" ]; then
    1.12 +		echo -n "Would you like to read the license (y/N) : "; read anser
    1.13 +		if [ "$anser" = "y" ]; then
    1.14 +			more < /usr/share/licenses/"$PACKAGE"/LICENSE
    1.15 +			echo "" 		
    1.16 +		fi
    1.17 +		echo "================================================================================"
    1.18 +		echo -n "Do you accept the license (y/N) : "; read anser
    1.19 +		if [ "$anser" = "N" ]; then
    1.20 +			echo "You did not accept the license, Removing the pkg."	
    1.21 +			tazpkg remove "$PACKAGE"		
    1.22 +		fi
    1.23  	fi
    1.24 -	echo "================================================================================"
    1.25 -	echo -n "Do you accept the license (y/N) : "; read anser
    1.26 -	if [ "$anser" = "N" ]; then
    1.27 -		echo "You did not accept the license, Removing the pkg."	
    1.28 -		tazpkg remove "$PACKAGE"		
    1.29 -	fi
    1.30 -
    1.31  }
    1.32  
    1.33  post_remove()