# HG changeset patch # User Pascal Bellard # Date 1299833235 -3600 # Node ID 8ca0fdca7d34ab8d0f5de189c5a87a89da74cb23 # Parent 7f93a5930b2d3281ce550a37416d69681c393200 nvidia: allow post_install without tty (again) diff -r 7f93a5930b2d -r 8ca0fdca7d34 nvidia/receipt --- a/nvidia/receipt Fri Mar 11 09:31:56 2011 +0100 +++ b/nvidia/receipt Fri Mar 11 09:47:15 2011 +0100 @@ -94,18 +94,19 @@ echo "================================================================================" echo "For installing this package, you have to accept the $PACKAGE license." echo "The license is stored in /usr/share/licenses/$PACKAGE " - echo -n "Would you like to read the license (y/N) : "; read anser - if [ "$anser" = "y" -a "$(tty)" != "not a tty" ]; then - more < /usr/share/licenses/"$PACKAGE"/LICENSE - echo "" + if [ "$(tty)" != "not a tty" ]; then + echo -n "Would you like to read the license (y/N) : "; read anser + if [ "$anser" = "y" ]; then + more < /usr/share/licenses/"$PACKAGE"/LICENSE + echo "" + fi + echo "================================================================================" + echo -n "Do you accept the license (y/N) : "; read anser + if [ "$anser" = "N" ]; then + echo "You did not accept the license, Removing the pkg." + tazpkg remove "$PACKAGE" + fi fi - echo "================================================================================" - echo -n "Do you accept the license (y/N) : "; read anser - if [ "$anser" = "N" ]; then - echo "You did not accept the license, Removing the pkg." - tazpkg remove "$PACKAGE" - fi - } post_remove()