openmamba-netsrpms: add support for accepting license from terminal when no DISPLAY is available

This commit is contained in:
Silvan Calarco 2013-03-03 01:13:20 +01:00
parent ea16cf3903
commit e2a9b882df

View File

@ -99,8 +99,17 @@ for pckname in $PACKAGES; do
cpio --quiet --extract --make-directories < $tmpfile ) 2>/dev/null cpio --quiet --extract --make-directories < $tmpfile ) 2>/dev/null
if [ -f $tmpdir/LICENSE ]; then if [ -f $tmpdir/LICENSE ]; then
license-dialog $tmpdir/LICENSE if [ "$DISPLAY" ]; then
[ $? -ne 0 ] && exit 1 license-dialog $tmpdir/LICENSE
[ $? -ne 0 ] && exit 1
else
echo "You must accept the following license terms:"
echo
more $tmpdir/LICENSE
echo -n "Do you agree with the above license terms [y/N]? "
read ans
[ "$ans" = "Y" -o "$ans" = "y" ] || exit 1
fi
fi fi
notify-send -a $"Network software installation" -i $icon "$pckname" $"$pckname installation in progress..." notify-send -a $"Network software installation" -i $icon "$pckname" $"$pckname installation in progress..."