Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions continuous_integration/install_spm.sh

This file was deleted.

36 changes: 22 additions & 14 deletions continuous_integration/install_spm12.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
#! /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

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
Expand All @@ -37,7 +40,8 @@ if [ ! -d mcr ]; then
chmod 755 ${MCRINST}
./${MCRINST} -P bean421.installLocation="mcr" -silent
fi



# create start-up script
cat <<EOF > spm12.sh
#!/bin/bash
Expand All @@ -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