]> git.donarmstrong.com Git - neurodebian.git/commitdiff
condition calls to update-* tools on their existence
authorYaroslav Halchenko <debian@onerussian.com>
Wed, 13 Aug 2014 17:44:01 +0000 (13:44 -0400)
committerYaroslav Halchenko <debian@onerussian.com>
Wed, 13 Aug 2014 17:44:01 +0000 (13:44 -0400)
tools/nd-vmsetupwizard

index 7afc31367f809af740dd8e5542e2b9802e3ae933..43a58809fe4f174d36b5b5c4a40d9f74b64fa576 100755 (executable)
@@ -32,11 +32,21 @@ Do you want to proceed with updating the system?
 fi
 
 # initialize apt
-update-manager -c
-
-sudo update-software-center --debug 2>&1 | \
-       zenity $icon_opt --title="Updating Software Center Repository"  \
-               --progress  --pulsate --auto-close --auto-kill 
+#
+# update-manager (from update-manager-gnome) and
+# update-software-center (from software-center)
+# are present only in wheezy
+if which update-manager > /dev/null; then update-manager -c; fi
+
+if which update-software-center > /dev/null; then
+    sudo update-software-center --debug 2>&1 | \
+           zenity $icon_opt --title="Updating Software Center Repository"  \
+                  --progress  --pulsate --auto-close --auto-kill;
+else
+    sudo apt-get update 2>&1 | \
+           zenity $icon_opt --title="Running apt-get update" \
+                  --progress  --pulsate --auto-close --auto-kill;
+fi
 
 popconf=/etc/popularity-contest.conf
 if [ ! -e "$popconf" ] || grep -q -e '^PARTICIPATE.*no' "$popconf" ;