From 46c0ff46015530d54b51067a5b79e804d5e283b8 Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Wed, 3 Nov 2010 16:05:33 -0400 Subject: [PATCH] Allow for custom title; charge "tasklist" --- debian/changelog | 4 ++-- tools/nd-autoinstall | 11 +++++++++-- tools/nd-vmsetupwizard | 21 +++++++++++++++------ 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index c301041..8074641 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -neurodebian (0.6) squeeze; urgency=low +neurodebian (0.8) squeeze; urgency=low * Initial release. - -- Michael Hanke Wed, 03 Nov 2010 14:41:15 -0400 + -- Michael Hanke Wed, 03 Nov 2010 16:11:48 -0400 diff --git a/tools/nd-autoinstall b/tools/nd-autoinstall index 8ea1253..66bcdb1 100755 --- a/tools/nd-autoinstall +++ b/tools/nd-autoinstall @@ -16,6 +16,7 @@ nd_autoinstall_version=0.1 ai_envfile= ai_package= ai_verbose= +ai_dialog_title= ai_force=0 print_verbose() @@ -67,6 +68,9 @@ Options: -v, --verbose Enable additional progress messages. + -t, --title + Optinal title of the installation dialog. + -h, --help Print short description, usage summary and option list. @@ -90,7 +94,7 @@ EOT # 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 @@ -105,6 +109,7 @@ while true ; do -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;; @@ -122,6 +127,8 @@ fi 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 @@ -156,7 +163,7 @@ if [ $do_install -eq 1 ]; then 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 diff --git a/tools/nd-vmsetupwizard b/tools/nd-vmsetupwizard index 792f431..1927bd3 100755 --- a/tools/nd-vmsetupwizard +++ b/tools/nd-vmsetupwizard @@ -52,14 +52,23 @@ fi 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 -- 2.39.2