From 0afb5997a22e1a0a373f80226837bf95d5c913e5 Mon Sep 17 00:00:00 2001 From: "Christophe Pallier (chrplr)" Date: Tue, 17 Jan 2017 10:53:38 +0100 Subject: [PATCH 1/7] install12 test --- continuous_integration/install_spm12.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/continuous_integration/install_spm12.sh b/continuous_integration/install_spm12.sh index e9dc5436..78238dff 100644 --- a/continuous_integration/install_spm12.sh +++ b/continuous_integration/install_spm12.sh @@ -1,26 +1,33 @@ #! /bin/bash +# Time-stamp: <2017-01-17 10:42:14 cp983411> set -e # set -x # echo on -SPM_ROOT_DIR=~/opt/spm12 # Installation directory - -SPM_SRC=spm12_r6685.zip +SPM_URL="http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/" +SPM12_FILE="spm12_r????.zip" MCRINST=MCRInstaller.bin +SPM_ROOT_DIR=~/opt/spm12 # local installation directory + + mkdir -p $SPM_ROOT_DIR && cd $SPM_ROOT_DIR if [ ! -d spm12 ]; then - if [ ! -f ${SPM_SRC} ]; then - wget http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/${SPM_SRC} + if [ ! -f "${SPM12_FILE}" ]; then + wget --recursive --level=1 --no-directories --accept "${SPM12_FILE}" "${SPM_URL}" + unzip -q "${SPM12_FILE}" + chmod 755 spm12/run_spm12.sh + else + echo "An older version of spm12*.zip is already present in in current dir" + echo "Please delete it before running this script" + exit -1 fi - unzip -q ${SPM_SRC} - chmod 755 spm12/run_spm12.sh fi if [ ! -d mcr ]; then if [ ! -f MCRInstaller.bin ]; then - wget http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/MCR/glnxa64/${MCRINST} + wget "${SPM_URL}/MCR/glnxa64/${MCRINST}" fi chmod 755 ${MCRINST} ./${MCRINST} -P bean421.installLocation="mcr" -silent From b6ef95b49efc14af6c4c92cc60692a9153c27a75 Mon Sep 17 00:00:00 2001 From: "Christophe Pallier (chrplr)" Date: Tue, 17 Jan 2017 13:42:21 +0100 Subject: [PATCH 2/7] more informative installation script --- continuous_integration/install_spm12.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/continuous_integration/install_spm12.sh b/continuous_integration/install_spm12.sh index 78238dff..9648dd37 100644 --- a/continuous_integration/install_spm12.sh +++ b/continuous_integration/install_spm12.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Time-stamp: <2017-01-17 10:42:14 cp983411> +# Time-stamp: <2017-01-17 13:42:00 cp983411> set -e # set -x # echo on @@ -30,7 +30,9 @@ if [ ! -d mcr ]; then wget "${SPM_URL}/MCR/glnxa64/${MCRINST}" fi chmod 755 ${MCRINST} + echo Installing Matlab\'s MCR... ./${MCRINST} -P bean421.installLocation="mcr" -silent + echo done fi @@ -48,7 +50,11 @@ fi $SPM_ROOT_DIR/spm12.sh quit cmds="export SPM_DIR=$SPM_ROOT_DIR/spm12/; export SPM_MCR=$SPM_ROOT_DIR/spm12.sh" ${cmds} -echo "You may want to add the following commands (the exports) to your ~/.bashrc file once and for all." +echo +echo "*** spm12.sh is install in ${SPM_ROOT_DIR} ***" +echo "You may want to add the following commands in your ~/.bashrc file once and for all." echo echo ${cmds} +echo +echo 'WARNING: If you saw a error message "Fatal error loading library ... " above, please check that libXp is installed on your computer (see "https://fr.mathworks.com/matlabcentral/answers/99815-why-do-i-receive-xsetup-errors-regarding-libxp-so-6-when-installing-or-launching-matlab-on-fedora-co?requestedDomain=www.mathworks.com)' From 71605cb1ffdb1ed0b9240fbbcd28a5bb02bae047 Mon Sep 17 00:00:00 2001 From: chrplr Date: Sun, 4 Jun 2017 16:07:07 +0200 Subject: [PATCH 3/7] spm12 standalone install with automatic detection of version --- continuous_integration/install_spm12.sh | 69 ++++++++++++------------- 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/continuous_integration/install_spm12.sh b/continuous_integration/install_spm12.sh index 9648dd37..a4c58246 100644 --- a/continuous_integration/install_spm12.sh +++ b/continuous_integration/install_spm12.sh @@ -1,60 +1,57 @@ #! /bin/bash -# Time-stamp: <2017-01-17 13:42:00 cp983411> +# Time-stamp: <2017-06-04 16:02:14 cp983411> + +# Download and install SPM12 standalone (no Matlab license required) +# see https://en.wikibooks.org/wiki/SPM/Standalone + set -e +# set -x # echo on for debugging + +# Installation directory can be specified as first argument on the command line +# Warning: use a fully qualitifed path (from root) to correctly set up env variables -# set -x # echo on +if [ $# -eq 0 ] + then + SPM_ROOT_DIR=$HOME/opt/spm12 # default +else + SPM_ROOT_DIR=$1 +fi + +mkdir -p $SPM_ROOT_DIR -SPM_URL="http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/" -SPM12_FILE="spm12_r????.zip" +# Download +SPM_SRC=spm12_r????.zip MCRINST=MCRInstaller.bin -SPM_ROOT_DIR=~/opt/spm12 # local installation directory +wget -N -r -l1 --no-parent -nd -P $SPM_ROOT_DIR -A.zip -R "index.html*" http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/ +wget -N -r -l1 --no-parent -nd -P $SPM_ROOT_DIR -A.bin http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/MCR/glnxa64/ -mkdir -p $SPM_ROOT_DIR && cd $SPM_ROOT_DIR -if [ ! -d spm12 ]; then - if [ ! -f "${SPM12_FILE}" ]; then - wget --recursive --level=1 --no-directories --accept "${SPM12_FILE}" "${SPM_URL}" - unzip -q "${SPM12_FILE}" - chmod 755 spm12/run_spm12.sh - else - echo "An older version of spm12*.zip is already present in in current dir" - echo "Please delete it before running this script" - exit -1 - fi -fi +# Install +cd $SPM_ROOT_DIR +unzip -q -u ${SPM_SRC} +chmod 755 spm12/run_spm12.sh if [ ! -d mcr ]; then - if [ ! -f MCRInstaller.bin ]; then - wget "${SPM_URL}/MCR/glnxa64/${MCRINST}" - fi - chmod 755 ${MCRINST} - echo Installing Matlab\'s MCR... - ./${MCRINST} -P bean421.installLocation="mcr" -silent - echo done + chmod 755 ${MCRINST} + ./${MCRINST} -P bean421.installLocation="mcr" -silent fi - - -if [ ! -f $SPM_ROOT_DIR/spm12.sh ]; then - cat < $SPM_ROOT_DIR/spm12.sh + +# create start-up script +cat < spm12.sh #!/bin/bash SPM12_STANDALONE_HOME=$SPM_ROOT_DIR/spm12 exec "\${SPM12_STANDALONE_HOME}/run_spm12.sh" "\${SPM12_STANDALONE_HOME}/../mcr/v713" \${1+"\$@"} EOF - chmod 755 $SPM_ROOT_DIR/spm12.sh -fi +chmod 755 spm12.sh # Create CTF -$SPM_ROOT_DIR/spm12.sh quit +${SPM_ROOT_DIR}/spm12.sh quit cmds="export SPM_DIR=$SPM_ROOT_DIR/spm12/; export SPM_MCR=$SPM_ROOT_DIR/spm12.sh" ${cmds} -echo -echo "*** spm12.sh is install in ${SPM_ROOT_DIR} ***" -echo "You may want to add the following commands in your ~/.bashrc file once and for all." +echo "You may want to add the following commands (the exports) to your ~/.bashrc file once and for all." echo echo ${cmds} -echo -echo 'WARNING: If you saw a error message "Fatal error loading library ... " above, please check that libXp is installed on your computer (see "https://fr.mathworks.com/matlabcentral/answers/99815-why-do-i-receive-xsetup-errors-regarding-libxp-so-6-when-installing-or-launching-matlab-on-fedora-co?requestedDomain=www.mathworks.com)' From 26bff0b91e0a7012ee6c1ff7e53d70f1353c189d Mon Sep 17 00:00:00 2001 From: "Christophe Pallier (chrplr)" Date: Tue, 17 Jan 2017 10:53:38 +0100 Subject: [PATCH 4/7] install12 test --- continuous_integration/install_spm12.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/continuous_integration/install_spm12.sh b/continuous_integration/install_spm12.sh index 32371d16..52272c23 100644 --- a/continuous_integration/install_spm12.sh +++ b/continuous_integration/install_spm12.sh @@ -1,4 +1,5 @@ #! /bin/bash +# Time-stamp: <2017-01-17 10:42:14 cp983411> set -e # set -x # echo on @@ -8,19 +9,20 @@ SPM_ROOT_DIR=~/opt/spm12 # Installation directory SPM_SRC=spm12_r7219.zip # this used to be spm12_r6914.zip, watch out it might get pulled down again!!! MCRINST=MCRInstaller.bin +SPM_ROOT_DIR=~/opt/spm12 # local installation directory + + mkdir -p $SPM_ROOT_DIR && cd $SPM_ROOT_DIR if [ ! -d spm12 ]; then if [ ! -f ${SPM_SRC} ]; then wget http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/${SPM_SRC} fi - unzip -q ${SPM_SRC} - chmod 755 spm12/run_spm12.sh fi if [ ! -d mcr ]; then if [ ! -f MCRInstaller.bin ]; then - wget http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/MCR/glnxa64/${MCRINST} + wget "${SPM_URL}/MCR/glnxa64/${MCRINST}" fi chmod 755 ${MCRINST} ./${MCRINST} -P bean421.installLocation="mcr" -silent From fc8af33246230b852d7c685363b3c52d899edcd3 Mon Sep 17 00:00:00 2001 From: "Christophe Pallier (chrplr)" Date: Tue, 17 Jan 2017 13:42:21 +0100 Subject: [PATCH 5/7] more informative installation script --- continuous_integration/install_spm12.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/continuous_integration/install_spm12.sh b/continuous_integration/install_spm12.sh index 52272c23..628b11da 100644 --- a/continuous_integration/install_spm12.sh +++ b/continuous_integration/install_spm12.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Time-stamp: <2017-01-17 10:42:14 cp983411> +# Time-stamp: <2017-01-17 13:42:00 cp983411> set -e # set -x # echo on @@ -25,7 +25,9 @@ if [ ! -d mcr ]; then wget "${SPM_URL}/MCR/glnxa64/${MCRINST}" fi chmod 755 ${MCRINST} + echo Installing Matlab\'s MCR... ./${MCRINST} -P bean421.installLocation="mcr" -silent + echo done fi @@ -43,6 +45,8 @@ fi $SPM_ROOT_DIR/spm12.sh quit cmds="export SPM_DIR=$SPM_ROOT_DIR/spm12/; export SPM_MCR=$SPM_ROOT_DIR/spm12.sh" ${cmds} -echo "You may want to add the following commands (the exports) to your ~/.bashrc file once and for all." +echo +echo "*** spm12.sh is install in ${SPM_ROOT_DIR} ***" +echo "You may want to add the following commands in your ~/.bashrc file once and for all." echo echo ${cmds} From 73cb0d2dddeb1b435410489f3a94464f35e2d8d5 Mon Sep 17 00:00:00 2001 From: chrplr Date: Sun, 4 Jun 2017 16:07:07 +0200 Subject: [PATCH 6/7] spm12 standalone install with automatic detection of version --- continuous_integration/install_spm12.sh | 48 ++++++++++++++----------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/continuous_integration/install_spm12.sh b/continuous_integration/install_spm12.sh index 628b11da..64bd6fa3 100644 --- a/continuous_integration/install_spm12.sh +++ b/continuous_integration/install_spm12.sh @@ -1,18 +1,33 @@ #! /bin/bash -# Time-stamp: <2017-01-17 13:42:00 cp983411> +# Time-stamp: <2017-06-04 16:02:14 cp983411> + +# Download and install SPM12 standalone (no Matlab license required) +# see https://en.wikibooks.org/wiki/SPM/Standalone + set -e +# set -x # echo on for debugging + +# Installation directory can be specified as first argument on the command line +# Warning: use a fully qualitifed path (from root) to correctly set up env variables + +if [ $# -eq 0 ] + then + SPM_ROOT_DIR=$HOME/opt/spm12 # default +else + SPM_ROOT_DIR=$1 +fi -# set -x # echo on +mkdir -p $SPM_ROOT_DIR SPM_ROOT_DIR=~/opt/spm12 # Installation directory SPM_SRC=spm12_r7219.zip # this used to be spm12_r6914.zip, watch out it might get pulled down again!!! MCRINST=MCRInstaller.bin -SPM_ROOT_DIR=~/opt/spm12 # local installation directory +wget -N -r -l1 --no-parent -nd -P $SPM_ROOT_DIR -A.zip -R "index.html*" http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/ +wget -N -r -l1 --no-parent -nd -P $SPM_ROOT_DIR -A.bin http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/MCR/glnxa64/ -mkdir -p $SPM_ROOT_DIR && cd $SPM_ROOT_DIR if [ ! -d spm12 ]; then if [ ! -f ${SPM_SRC} ]; then @@ -21,32 +36,23 @@ if [ ! -d spm12 ]; then fi if [ ! -d mcr ]; then - if [ ! -f MCRInstaller.bin ]; then - wget "${SPM_URL}/MCR/glnxa64/${MCRINST}" - fi - chmod 755 ${MCRINST} - echo Installing Matlab\'s MCR... - ./${MCRINST} -P bean421.installLocation="mcr" -silent - echo done + chmod 755 ${MCRINST} + ./${MCRINST} -P bean421.installLocation="mcr" -silent fi - - -if [ ! -f $SPM_ROOT_DIR/spm12.sh ]; then - cat < $SPM_ROOT_DIR/spm12.sh + +# create start-up script +cat < spm12.sh #!/bin/bash SPM12_STANDALONE_HOME=$SPM_ROOT_DIR/spm12 exec "\${SPM12_STANDALONE_HOME}/run_spm12.sh" "\${SPM12_STANDALONE_HOME}/../mcr/v713" \${1+"\$@"} EOF - chmod 755 $SPM_ROOT_DIR/spm12.sh -fi +chmod 755 spm12.sh # Create CTF -$SPM_ROOT_DIR/spm12.sh quit +${SPM_ROOT_DIR}/spm12.sh quit cmds="export SPM_DIR=$SPM_ROOT_DIR/spm12/; export SPM_MCR=$SPM_ROOT_DIR/spm12.sh" ${cmds} -echo -echo "*** spm12.sh is install in ${SPM_ROOT_DIR} ***" -echo "You may want to add the following commands in your ~/.bashrc file once and for all." +echo "You may want to add the following commands (the exports) to your ~/.bashrc file once and for all." echo echo ${cmds} From 423ae4f9492fe852419e11e569d49f8bedf54bc7 Mon Sep 17 00:00:00 2001 From: chrplr Date: Wed, 14 Feb 2018 11:29:37 +0100 Subject: [PATCH 7/7] warn about installing libXp.so.6 if it is missing --- README.rst | 2 +- continuous_integration/install_spm.sh | 53 ------------------------- continuous_integration/install_spm12.sh | 33 ++++++++++----- 3 files changed, 24 insertions(+), 64 deletions(-) delete mode 100644 continuous_integration/install_spm.sh diff --git a/README.rst b/README.rst index 97181e19..68decc1b 100755 --- a/README.rst +++ b/README.rst @@ -50,7 +50,7 @@ Installation ============ To begin with, you may also want to install the pre-compiled version of SPM (in case you don't have matlab, etc.). Just run the following:: - $ bash continuous_integration/install_spm.sh + $ . continuous_integration/install_spm12.sh First, install neurodebian-travis:: diff --git a/continuous_integration/install_spm.sh b/continuous_integration/install_spm.sh deleted file mode 100644 index a3db7d41..00000000 --- a/continuous_integration/install_spm.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -set -e - -SPM_ROOT_DIR=~/opt/spm8 - -if [ -d "$SPM_ROOT_DIR" ] -then - echo "spm already installed" -else - echo "Creating directory : " $SPM_ROOT_DIR - mkdir -p $SPM_ROOT_DIR && cd $SPM_ROOT_DIR - echo "Downloading spm8 : " - wget http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/spm8/spm8_r5236.zip - echo "Unzipping : " - unzip -q spm8_r5236.zip - echo "Chmoding : " - chmod 755 spm8/run_spm8.sh - echo "Downloading MCR : " - wget http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/MCR/glnxa64/MCRInstaller.bin - echo "Chmoding : " - chmod 755 MCRInstaller.bin - echo "Installing MCR : " - ./MCRInstaller.bin -P bean421.installLocation="mcr" -silent -fi - -echo "Writing spm.sh : " -cat < $SPM_ROOT_DIR/spm8.sh -#!/bin/bash -SPM8_STANDALONE_HOME=$SPM_ROOT_DIR/spm8 -exec "\${SPM8_STANDALONE_HOME}/run_spm8.sh" "\${SPM8_STANDALONE_HOME}/../mcr/v713" \${1+"\$@"} -EOF -echo "Chmoding : " -chmod 755 $SPM_ROOT_DIR/spm8.sh -echo "Quiting : " -# Create CTF -$SPM_ROOT_DIR/spm8.sh quit -echo "Export SPM_DIR and SPM_MCR by running the following commands:" -echo -cmds="export SPM_DIR=$SPM_ROOT_DIR/spm8/spm8_mcr/spm8; export SPM_MCR=$SPM_ROOT_DIR/spm8.sh" -echo ${cmds} -echo -echo "N.B.: You may want add the above commands (the exports) to your ~/.bashrc file once and for all." -${cmds} - - - - - - - - - - diff --git a/continuous_integration/install_spm12.sh b/continuous_integration/install_spm12.sh index 64bd6fa3..cf0a5482 100644 --- a/continuous_integration/install_spm12.sh +++ b/continuous_integration/install_spm12.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Time-stamp: <2017-06-04 16:02:14 cp983411> +# Time-stamp: <2018-02-14 11:26:59 cp983411> # Download and install SPM12 standalone (no Matlab license required) # see https://en.wikibooks.org/wiki/SPM/Standalone @@ -19,9 +19,8 @@ fi mkdir -p $SPM_ROOT_DIR -SPM_ROOT_DIR=~/opt/spm12 # Installation directory - -SPM_SRC=spm12_r7219.zip # this used to be spm12_r6914.zip, watch out it might get pulled down again!!! +# Download +SPM_SRC=spm12_r????.zip MCRINST=MCRInstaller.bin wget -N -r -l1 --no-parent -nd -P $SPM_ROOT_DIR -A.zip -R "index.html*" http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/ @@ -29,11 +28,10 @@ wget -N -r -l1 --no-parent -nd -P $SPM_ROOT_DIR -A.zip -R "index.html*" http:// wget -N -r -l1 --no-parent -nd -P $SPM_ROOT_DIR -A.bin http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/MCR/glnxa64/ -if [ ! -d spm12 ]; then - if [ ! -f ${SPM_SRC} ]; then - wget http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/${SPM_SRC} - fi -fi +# Install +cd $SPM_ROOT_DIR +unzip -q -u ${SPM_SRC} +chmod 755 spm12/run_spm12.sh if [ ! -d mcr ]; then chmod 755 ${MCRINST} @@ -49,10 +47,25 @@ EOF chmod 755 spm12.sh +if [ ! -f /usr/lib/x86_64-linux-gnu/libXp.so.6 ]; then + echo "WARNING!!!" + echo "/usr/lib/x86_64-linux-gnu/libXp.so.6 is missing" + echo + echo To install it: + echo 'sudo add-apt-repository "deb http://securuty.ubuntu.com/ubuntu precise-security main"' + echo 'sudo apt update' + echo 'sudo apt install lixp6' + echo 'sudo add-apt-repository -r "deb http://securuty.ubuntu.com/ubuntu precise-security main"' +fi + # Create CTF ${SPM_ROOT_DIR}/spm12.sh quit cmds="export SPM_DIR=$SPM_ROOT_DIR/spm12/; export SPM_MCR=$SPM_ROOT_DIR/spm12.sh" ${cmds} -echo "You may want to add the following commands (the exports) to your ~/.bashrc file once and for all." echo echo ${cmds} +echo "IMPORTANT: you should now execute the following line: " +echo "echo ${cmds} >> $HOME/.bashrc" + + +