#!/bin/sh
# Config prior to download/install of Mathematica 4.1
#
# (C) 2008 Atsuhito Kohda
# You may freely distribute this file under the terms of the GNU General
# Public License, version 2 or later

set -e

# Source debconf library.
. /usr/share/debconf/confmodule

if [ -n "$http_proxy" ] ; then
  db_set ttf-mathematica4.1/http_proxy $http_proxy
fi
db_input medium ttf-mathematica4.1/http_proxy || true

db_input critical ttf-mathematica4.1/license || true
db_input critical ttf-mathematica4.1/accept_license || true

db_go

db_get ttf-mathematica4.1/accept_license
if [ "$RET" != "true" ]; then
    db_fset ttf-mathematica4.1/license seen false
    db_fset ttf-mathematica4.1/accept_license seen false
elif [ "$RET" = "true" ]; then
    # license accepted
    exit 0
fi

