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 cf0a5482..0f693e2f 100644 --- a/continuous_integration/install_spm12.sh +++ b/continuous_integration/install_spm12.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Time-stamp: <2018-02-14 11:26:59 cp983411> +# Time-stamp: <2018-02-25 13:48:38 cp983411> # Download and install SPM12 standalone (no Matlab license required) # see https://en.wikibooks.org/wiki/SPM/Standalone @@ -7,14 +7,17 @@ set -e # set -x # echo on for debugging +OWD=$PWD + # 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 +# Warning: use a fully qualified path (from root) to correctly set up env variables if [ $# -eq 0 ] - then - SPM_ROOT_DIR=$HOME/opt/spm12 # default +then + echo "This script downloads and installs SPM12 standalone (https://en.wikibooks.org/wiki/SPM/Standalone)" + read -p "Installation directory? " -e -i "$HOME/opt/spm12" SPM_ROOT_DIR else - SPM_ROOT_DIR=$1 + SPM_ROOT_DIR=$1 fi mkdir -p $SPM_ROOT_DIR @@ -37,7 +40,8 @@ if [ ! -d mcr ]; then chmod 755 ${MCRINST} ./${MCRINST} -P bean421.installLocation="mcr" -silent fi - + + # create start-up script cat < spm12.sh #!/bin/bash @@ -48,24 +52,28 @@ EOF chmod 755 spm12.sh if [ ! -f /usr/lib/x86_64-linux-gnu/libXp.so.6 ]; then - echo "WARNING!!!" + echo "IMPORTANT:" 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 To install it, you must execute: + echo 'sudo add-apt-repository "deb http://security.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"' + echo 'sudo apt install libxp6' + echo 'sudo add-apt-repository -r "deb http://security.ubuntu.com/ubuntu precise-security main"' + echo fi # Create CTF ${SPM_ROOT_DIR}/spm12.sh quit + +# Create environment variables for pypreprocess + cmds="export SPM_DIR=$SPM_ROOT_DIR/spm12/; export SPM_MCR=$SPM_ROOT_DIR/spm12.sh" ${cmds} +echo "IMPORTANT: pypreprocess will need the SPM_DIR and SPM_MCR variables. you should execute the following line: " echo -echo ${cmds} -echo "IMPORTANT: you should now execute the following line: " -echo "echo ${cmds} >> $HOME/.bashrc" +echo "echo \"${cmds}\" >> $HOME/.profile" +cd $OWD