Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
base
Commits
8620bb3e
Commit
8620bb3e
authored
3 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Handling of <Command>_gui wrappers explained.
parent
4f6e511b
No related branches found
No related tags found
1 merge request
!24
TEST: Make sure wrapper can be created for "<command>_gui" if the source command exists
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/fsl/sbin/createFSLWrapper
+18
-12
18 additions, 12 deletions
share/fsl/sbin/createFSLWrapper
with
18 additions
and
12 deletions
share/fsl/sbin/createFSLWrapper
+
18
−
12
View file @
8620bb3e
...
...
@@ -8,6 +8,9 @@
# executables that are installed into the FSL conda environment (for example,
# python, pip, tcl, etc).
#
# This script is intended to be called by the post-link.sh script of the conda
# recipe for each FSL project that provides executable commands.
#
# This script should only be invoked when FSL is being installed via the
# fslinstaller script - it is not intended to be used when individual FSL
# projects are explicitly installed into a custom conda environment.
...
...
@@ -16,9 +19,6 @@
# FSL_CREATE_WRAPPER_SCRIPTS variables are set appropriately before creating
# the FSL conda environment.
#
# This script is intended to be called by the post-link.sh script of the conda
# recipe for each FSL project that provides executable commands.
#
# Wrapper scripts will only be created if the following conditions are met:
#
# - The $FSLDIR and $PREFIX environment variables are set, and
...
...
@@ -41,6 +41,17 @@
# characters. Depending on where FSL is installed, it may not be possible
# to have a shebang line pointing to $FSLDIR/bin/python which does not
# exceed 127 characters.
#
# Wrapper scripts are created for *all* FSL commands, including FSL TCL GUI
# commands (e.g. "fsl", "Flirt", "Flirt_gui", etc). FSL TCL GUIs are called
# (e.g.) "<Command>" om Linux, but "<Command>_gui" on macOS, because macOS
# file systems are usually case-sensitive.
#
# To work around this, and to not accidentally create a link called <Command>
# to <command>, the FSL package post link scripts should only specify
# "<Command>_gui", and *not* "<Command>". This script will create a wrapper
# script for the appropriate variant ("<Command>_gui" on macOS, or "<Command>"
# on Linux).
# Names of all executables for which wrapper
# scripts are to be created are passed as
...
...
@@ -67,15 +78,10 @@ fi
for
script
in
$targets
;
do
sourceScript
=
"
${
PREFIX
}
/bin/
$script
"
# FSL GUIs are called (e.g.) <Command> om Linux,
# but <Command>_gui on macOS, because macOS file
# systems are usually case-sensitive. To work
# around this (and to not accidentally create a
# link called <Command> to <command>), the FSL
# package post link scripts only specify
# <Command>_gui. Here, we remove the _gui suffix
# if no source file exists (in which we are
# likely running on Linux)
# Wrapper script for a FSL TCL GUI - here, we
# remove the _gui suffix if no source file
# exists (in which we are likely running on
# Linux).
if
[[
"
$script
"
==
*
"_gui"
]]
&&
[
!
-f
"
$sourceScript
"
]
;
then
script
=
${
script
/_gui/
}
sourceScript
=
"
${
PREFIX
}
/bin/
$script
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment