]> git.donarmstrong.com Git - neurodebian.git/commitdiff
nd-autoinstall: Provide user with information on how much should be downloaded
authorYaroslav Halchenko <debian@onerussian.com>
Thu, 4 Nov 2010 19:38:58 +0000 (15:38 -0400)
committerYaroslav Halchenko <debian@onerussian.com>
Thu, 4 Nov 2010 19:38:58 +0000 (15:38 -0400)
debian/changelog
tools/nd-autoinstall

index b8fcb008fd4fc8a6d1ac66b1f92bfeaacaeadaeb..ba5f1d5bfca4a9915d4a309433e5465a635775cb 100644 (file)
@@ -1,4 +1,4 @@
-neurodebian (0.17) squeeze; urgency=low
+neurodebian (0.18) squeeze; urgency=low
 
   * Initial release.
 
index 85e2be82769b49d94f8c982634a40dd2b14eba21..dd71b3f47012c915b42c38aae5418db9c77cda09 100755 (executable)
@@ -2,7 +2,7 @@
 #emacs: -*- mode: shell-script; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
 #ex: set sts=4 ts=4 sw=4 et:
 
-# play save
+# play safe
 set -e
 set -u
 
@@ -148,9 +148,16 @@ if [ $ai_force -eq 1 ]; then
 fi
 
 if [ $do_install -eq 1 ]; then
+    # Figure out amount of space to download/occupy
+    space_info="$(LC_ALL=C apt-get --print-uris install $ai_package 2>/dev/null \
+        | grep -e '^\(Need to get \|After this\)' || : )"
     if [ $ai_force -eq 0 ]; then
                if ! zenity --question \
-                       --text="To run '$ai_command', $ai_package package needs to be installed.  Do you want to proceed?"; then
+                       --text="To run '$ai_command', $ai_package package needs to be installed.
+
+$space_info
+
+Do you want to proceed?"; then
                        exit 2
                fi
        fi
@@ -164,7 +171,8 @@ if [ $do_install -eq 1 ]; then
         && rm -f $logfile; } \
         | tee $logfile \
         | zenity --title="$ai_dialog_title" \
-                        --text="Installing $ai_package" \
+                        --text="Installing $ai_package
+$space_info" \
                  --progress --pulsate --auto-close --auto-kill
     if [ -e $logfile ] ; then
         zenity --title="Installation of $ai_package has failed: see $logfile" \