From: Yaroslav Halchenko Date: Wed, 13 Aug 2014 17:44:01 +0000 (-0400) Subject: condition calls to update-* tools on their existence X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2fd15552bcfb833da37d1dd49d6554052c01f168;p=neurodebian.git condition calls to update-* tools on their existence --- diff --git a/tools/nd-vmsetupwizard b/tools/nd-vmsetupwizard index 7afc313..43a5880 100755 --- a/tools/nd-vmsetupwizard +++ b/tools/nd-vmsetupwizard @@ -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" ;