forked from automaticanalysis/automaticanalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try python as trigger script language
- Loading branch information
Showing
3 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ fi | |
if [[ "x${LOAD_FREESURFER}x" == "x1x" ]]; then | ||
source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_freesurfer.sh $TOOLDIR 7.2.0 centos7 "[email protected]\n7061\n *Ccpi6x7PAIeQ\n FS96pPK5vW.0g" $TEMPLATEDIR | ||
fi | ||
|
||
whatwhat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 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. | ||
|
||
import sys | ||
import subprocess | ||
import platform | ||
|
||
plt = platform.system() | ||
|
||
if plt == "Windows": | ||
print("Your system is Windows") | ||
sys.stdout.flush() | ||
# do x y z | ||
elif plt == "Linux": | ||
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") | ||
sys.stdout.flush() | ||
# do x y z | ||
else: | ||
print("Unidentified system:") | ||
print(plt) | ||
sys.stdout.flush() |