]> git.donarmstrong.com Git - neurodebian.git/blobdiff - tools/nd-vmsetupwizard
ENH: nd-vmsetupwizard for wheezy -- robust link, meta-selections for R, PyMVPA; remov...
[neurodebian.git] / tools / nd-vmsetupwizard
index 539fb350a09c0afc2f8af42ec984c5cca219d37c..c889a046faa18e631fbd8cf37cf2c90a86611f8b 100755 (executable)
@@ -34,15 +34,26 @@ fi
 # initialize apt
 update-manager -c
 
-if [ ! -e /etc/popularity-contest.conf ]; then
+sudo update-software-center --debug 2>&1 | \
+       zenity $icon_opt --title="Updating Software Center Repository"  \
+               --progress  --pulsate --auto-close --auto-kill 
+
+popconf=/etc/popularity-contest.conf
+if [ ! -e "$popconf" ] || grep -q -e '^PARTICIPATE.*no' "$popconf" ;
+then
        zenity --info $icon_opt --title="NeuroDebian Setup Wizard" \
                --text="You will now be given the choice to participate in the package survey. If enabled, a list of installed packages will be anonymously sent to Debian (http://popcon.debian.org). Your participation is important for two reasons:
 
 1) Popular packages receive more attention from developers, bugs are fixed faster and updates are provided quicker.
 2) User statistics can help research software developers to acquire funding for continued development."
 
+       if [ -e "$popconf" ] ; then
+       # just reconfigure so user could get a chance to participate
+               sudo DEBIAN_FRONTEND=gnome dpkg-reconfigure popularity-contest
+       else
        # install, but do not fail if something goes wrong
-       nd-autoinstall popularity-contest /etc/popularity-contest.conf || true
+               nd-autoinstall popularity-contest /etc/popularity-contest.conf || true
+       fi
 fi
 
 # install custom filter for synaptics
@@ -77,9 +88,26 @@ EOT
        sudo bash -c "mkdir -p $cfg_dir && touch $success_flag"
 fi
 
+if ! grep -q '/etc/fsl/fsl.sh' $HOME/.profile && \
+   zenity --question $icon_opt --title="FSL/AFNI Environments" \
+--text="Packages, such as AFNI and FSL, provide large collections of command line tools which are available from their private directories, and require custom environment variables to be set for proper functioning.  Usually you need to source /etc/fsl/fsl.sh or /etc/afni/afni.sh in your environments.
+
+Do you want to get those files, if available, sourced automatically for your environment?
+"; then
+   for t in fsl afni cmtk freesurfer; do
+       cf="/etc/$t/$t.sh"
+       grep -q -e "$cf" $HOME/.profile || \
+               echo "[ -e \"$cf\" ] && . $cf" >> $HOME/.profile
+   done
+fi
+
 # create symlink to shared folder into homedir
-[ ! -e $HOME/host ] && ln -s /mnt/host $HOME/host
+# note: -e check would exit 1 if link is broken
+#       ln -f is used for further robustness
+[ ! -L $HOME/host ] && ln -sf /media/sf_host $HOME/host
 
+# TODO:
+#   we need to package python-mvpa2-tutorial-data for PyMVPA
 packages=$(zenity --list $icon_opt --checklist --column="Install" --column="Description" \
           --column="Package Name" --print-column=3 --hide-column=3 --hide-header \
           --separator=' ' --text="Please select any additional component that shall be installed.
@@ -89,11 +117,13 @@ on the system. No installed packages will be reinstalled or removed, only
 additional components will be installed." \
 FALSE "Emacs" "emacs" \
 FALSE "GNU Image Manipulation Program (Gimp)" "gimp" \
+FALSE "Octave" "octave,qtoctave" \
 FALSE "OpenOffice.org" "openoffice.org" \
-FALSE "Scientific Python" "ipython,python-numpy,python-matplotlib" \
+FALSE "PyMVPA" "ipython,python-mvpa2,python-mvpa2-doc,spyder" \
+FALSE "R" "r-recommended" \
+FALSE "Scientific Python" "ipython,python-scipy,python-matplotlib,spyder,python-pandas" \
 FALSE "TeX Live" "texlive" \
 FALSE "Adobe Flash browser plugin" "flashplugin-nonfree" \
-FALSE "Sun Java browser plugin" "sun-java6-plugin" \
 || true)
 
 if [ -n "$packages" ]; then