From bc26d5dc407c793b1998de613817d838aaf1592c Mon Sep 17 00:00:00 2001 From: Aljen Uitbeijerse Date: Thu, 25 Nov 2021 12:14:33 +0100 Subject: [PATCH] Final? --- .github/workflows/configure_aa.sh | 5 ---- .github/workflows/tools_install.sh | 18 ++++++++++++++ .github/workflows/tools_install_b.sh | 16 ------------- .github/workflows/trigger_install.m | 36 ---------------------------- .github/workflows/trigger_install.py | 26 ++------------------ 5 files changed, 20 insertions(+), 81 deletions(-) delete mode 100644 .github/workflows/configure_aa.sh delete mode 100644 .github/workflows/tools_install_b.sh delete mode 100644 .github/workflows/trigger_install.m diff --git a/.github/workflows/configure_aa.sh b/.github/workflows/configure_aa.sh deleted file mode 100644 index 964dd3b30..000000000 --- a/.github/workflows/configure_aa.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Free space:" -df -h -mkdir $HOME/.aa -cp $GITHUB_WORKSPACE/.github/workflows/$PARAMETER_XML $HOME/.aa/aap_parameters_user.xml -mkdir $HOME/projects \ No newline at end of file diff --git a/.github/workflows/tools_install.sh b/.github/workflows/tools_install.sh index 2c36a5274..71d51ec5e 100644 --- a/.github/workflows/tools_install.sh +++ b/.github/workflows/tools_install.sh @@ -11,3 +11,21 @@ python $TOOLDIR/get-pip.py --force-reinstall # All MATLAB tools MUST be installed referred by the parameterset source $GITHUB_WORKSPACE/.github/workflows/tools_urls.sh source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_tools.sh $GITHUB_WORKSPACE/.github/workflows/$PARAMETER_XML $TOOLDIR + +echo "FSL: ${LOAD_FSL}; FREESURFER: ${LOAD_FREESURFER}" + +if [[ "x${LOAD_FSL}x" == "x1x" ]]; then + source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_fsl.sh $TOOLDIR 6.0.5 centos7 0 $TOOLDIR/config/fsl_bash.sh +else # FSL standards are needed for some modules + source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_fsl.sh $TOOLDIR 6.0.5 centos7 1 +fi + +if [[ "x${LOAD_FREESURFER}x" == "x1x" ]]; then + source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_freesurfer.sh $TOOLDIR 7.2.0 centos7 "tibor.auer@gmail.com\n7061\n *Ccpi6x7PAIeQ\n FS96pPK5vW.0g" $TEMPLATEDIR +fi + +echo "Free space:" +df -h +mkdir $HOME/.aa +cp $GITHUB_WORKSPACE/.github/workflows/$PARAMETER_XML $HOME/.aa/aap_parameters_user.xml +mkdir $HOME/projects \ No newline at end of file diff --git a/.github/workflows/tools_install_b.sh b/.github/workflows/tools_install_b.sh deleted file mode 100644 index d86cad0de..000000000 --- a/.github/workflows/tools_install_b.sh +++ /dev/null @@ -1,16 +0,0 @@ -TOOLDIR=$HOME/tools -TEMPLATEDIR=$TOOLDIR/templates - -echo "FSL: ${LOAD_FSL}; FREESURFER: ${LOAD_FREESURFER}" - -if [[ "x${LOAD_FSL}x" == "x1x" ]]; then - source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_fsl.sh $TOOLDIR 6.0.5 centos7 0 $TOOLDIR/config/fsl_bash.sh -else # FSL standards are needed for some modules - source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_fsl.sh $TOOLDIR 6.0.5 centos7 1 -fi - -if [[ "x${LOAD_FREESURFER}x" == "x1x" ]]; then - source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_freesurfer.sh $TOOLDIR 7.2.0 centos7 "tibor.auer@gmail.com\n7061\n *Ccpi6x7PAIeQ\n FS96pPK5vW.0g" $TEMPLATEDIR -fi - -whatwhat \ No newline at end of file diff --git a/.github/workflows/trigger_install.m b/.github/workflows/trigger_install.m deleted file mode 100644 index 97234df54..000000000 --- a/.github/workflows/trigger_install.m +++ /dev/null @@ -1,36 +0,0 @@ -% Script to trigger tools etc. installation -% Make sure to throw an error on failure. - -if ismac() - % Code to run on Mac platform - % Before isunix, because Mac is also unix - throw(MException('trigger_install:platform_support', 'Mac not supported yet')) -elseif isunix() - % Code to run on Linux platform - [status, cmdout] = system('source $GITHUB_WORKSPACE/.github/workflows/tools_install.sh'); - cmdout - if ~status - % 0 if ok, non-zero if problem - throw(MException('trigger_install:install_status', 'Problem while running tools_install')) - end - - [status, cmdout] = system('source $GITHUB_WORKSPACE/.github/workflows/tools_install_b.sh'); - cmdout - if ~status - % 0 if ok, non-zero if problem - throw(MException('trigger_install:install_status', 'Problem while running tools_install_b')) - end - - % Configure aa - [status, cmdout] = system('source $GITHUB_WORKSPACE/.github/workflows/configure_aa.sh'); - cmdout - if ~status - % 0 if ok, non-zero if problem - throw(MException('trigger_install:install_status', 'Problem while running configure_aa')) - end -elseif ispc() - % Code to run on Windows platform - throw(MException('trigger_install:platform_support', 'Windows not supported yet')) -else - throw(MException('trigger_install:platform_support', 'Platform not supported')) -end diff --git a/.github/workflows/trigger_install.py b/.github/workflows/trigger_install.py index d2abcc3e3..e8ae28e80 100644 --- a/.github/workflows/trigger_install.py +++ b/.github/workflows/trigger_install.py @@ -1,6 +1,7 @@ # Note: Assume Python 2.7, since that will have been installed for facemasking requirements. # -# Using python (instead of matlab) because using system() in matlab gives enormous amount of command window output. +# Using python (instead of matlab) because using system() in matlab gives enormous amount of +# command window output, and there is some problem with the status code from system() import sys import subprocess @@ -16,29 +17,6 @@ print("Your system is Linux") sys.stdout.flush() subprocess.check_call('source $GITHUB_WORKSPACE/.github/workflows/tools_install.sh', shell=True, executable="/bin/bash") - #if status<0: - # # 0 if ok, non-zero if problem - # raise Exception('Problem while running tools_install') - #else: - # print(status) - # sys.stdout.flush() - - subprocess.check_call('source $GITHUB_WORKSPACE/.github/workflows/tools_install_b.sh', shell=True, executable="/bin/bash") - #if status!=0: - # # 0 if ok, non-zero if problem - # raise Exception('Problem while running tools_install_b') - #else: - # print(status) - # sys.stdout.flush() - - # Configure aa - subprocess.check_call('source $GITHUB_WORKSPACE/.github/workflows/configure_aa.sh', shell=True, executable="/bin/bash") - #if status!=0: - # # 0 if ok, non-zero if problem - # raise Exception('Problem while running configure_aa') - #else: - # print(status) - # sys.stdout.flush() elif plt == "Darwin": print("Your system is MacOS")