ai_envfile=
ai_package=
ai_verbose=
+ai_dialog_title=
ai_force=0
print_verbose()
-v, --verbose
Enable additional progress messages.
+ -t, --title
+ Optinal title of the installation dialog.
+
-h, --help
Print short description, usage summary and option list.
# Note that we use `"$@"' to let each command-line parameter expand to a
# separate word. The quotes around `$@' are essential!
# We need CLOPTS as the `eval set --' would nuke the return value of getopt.
-CLOPTS=`getopt -o h,e:,p:,f,v --long help,version,environment-file:,package:,verbose,force -n 'nd-autoinstall' -- "$@"`
+CLOPTS=`getopt -o h,e:,p:,t:,f,v --long help,version,environment-file:,package:,title:,verbose,force -n 'nd-autoinstall' -- "$@"`
if [ $? != 0 ] ; then
echo "Terminating..." >&2
-e|--environment-file) shift; ai_envfile=$1; shift;;
-f|--force) ai_force=1; shift;;
-p|--package) shift; ai_package=$1; shift;;
+ -t|--title) shift; ai_dialog_title=$1; shift;;
-v|--verbose) ai_verbose=1; shift;;
-h|--help) print_help; exit 0;;
--version) print_version; exit 0;;
ai_command=$1; shift
[ -z "$ai_package" ] && ai_package=$ai_command
+[ -z "$ai_dialog_title" ] && ai_dialog_title="Package installation"
+
ai_envfile_failed=
if [ ! -z "$ai_envfile" ]; then
source "$ai_envfile" || ai_envfile_failed=1
DEBIAN_FRONTEND=gnome /usr/bin/apt-get install -y $ai_package 2>&1 \
&& rm -f $logfile; } \
| tee $logfile \
- | zenity --title="Package installation" \
+ | zenity --title="$ai_dialog_title" \
--text="Installing $ai_package" \
--progress --pulsate --auto-close --auto-kill
if [ -e $logfile ] ; then
packages=$(zenity --list --checklist --column="Install" --column="Description" \
--column="Package Name" --print-column=3 --hide-column=3 --hide-header \
- --separator=' ' --text="This is the manual
-" \
-FALSE "one" "ipython" \
-FALSE "two" "vim" \
-FALSE "three" "bc dc" || true)
+ --separator=' ' --text="Please select any additional component that shall be installed.
+
+Please note that this selection will not affect packages already installed
+on the system. No installed packages will be reinstalled or removed, only
+additional components will be installed." \
+FALSE "Emacs" "emacs" \
+FALSE "OpenOffice.org" "openoffice.org" \
+FALSE "Scientific Python" "ipython,python-numpy,python-matplotlib" \
+FALSE "TeX Live" "texlive" \
+FALSE "Adobe Flash browser plugin" "flashplugin-nonfree" \
+FALSE "Sun Java browser plugin" "sun-java6-plugin" \
+|| true)
if [ -n "$packages" ]; then
- nd-autoinstall -f -p "$packages" true
+ for pkgs in $packages; do
+ nd-autoinstall -f -p "${pkgs//,/ }" true
+ done
fi
# and start greeter