]> git.donarmstrong.com Git - neurodebian.git/blobdiff - tools/nd-vmsetupwizard
Adjusted nd-vmsetupwizard to install all ipython components + skimage and statsmodels...
[neurodebian.git] / tools / nd-vmsetupwizard
index abc58211a2f490435ebd7522adddd612ddbb2cb7..7afc31367f809af740dd8e5542e2b9802e3ae933 100755 (executable)
@@ -49,7 +49,7 @@ then
 
        if [ -e "$popconf" ] ; then
        # just reconfigure so user could get a chance to participate
-               sudo DEBIAN_FRONTEND=gnome dpkg-reconfigure popularity-contest  
+               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
@@ -88,10 +88,32 @@ EOT
        sudo bash -c "mkdir -p $cfg_dir && touch $success_flag"
 fi
 
-# create symlink to shared folder into homedir
-[ ! -e $HOME/host ] && ln -s /mnt/host $HOME/host
+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.
 
-packages=$(zenity --list $icon_opt --checklist --column="Install" --column="Description" \
+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
+# 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
+
+# Figure out which version of IPython is available
+ipython_version=$(apt-cache policy ipython 2>/dev/null | sed -ne '/Version table:/ { n;s,^[ \*]*\(.*\) .*,\1,gp}')
+dpkg --compare-versions $ipython_version lt 0.13.1 && ipython=ipython01x || ipython=ipython,ipython-notebook,ipython-qtconsole
+
+# TODO: add PyMVPA:
+#   FALSE "PyMVPA" "python-mvpa2,python-mvpa2-doc,python-mvpa2-tutorial-data" \
+# needs -doc and -tutorial-data package
+packages=$(zenity --height 450 --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.
 
@@ -99,13 +121,16 @@ 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 "GNU Image Manipulation Program (Gimp)" "gimp" \
-FALSE "Octave" "octave,qtoctave" \
+FALSE "Graphics (e.g. GIMP, Inscape)" "gimp,inkscape,svgtune,xzgv,vym" \
+FALSE "Octave" "qtoctave" \
 FALSE "OpenOffice.org" "openoffice.org" \
-FALSE "Scientific Python" "ipython,python-numpy,python-matplotlib" \
+FALSE "PyMVPA Tutorial" "$ipython,python-mvpa2,python-mvpa2-doc,python-mvpa2-tutorialdata,spyder" \
+FALSE "Python: Electrophysiology & Modeling" "python-brian,python-pynn,python-pyentropy,stimfit" \
+FALSE "Python: Neuroimaging" "$ipython,spyder,nipy-suite,python-mvpa2" \
+FALSE "Python: Scientific stack" "$ipython,spyder,python-matplotlib,python-pandas,python-sympy,python-statsmodels,python-skimage" \
+FALSE "R" "r-recommended" \
 FALSE "TeX Live" "texlive" \
 FALSE "Adobe Flash browser plugin" "flashplugin-nonfree" \
-FALSE "Sun Java browser plugin" "sun-java6-plugin" \
 || true)
 
 if [ -n "$packages" ]; then