Skip to content
Snippets Groups Projects
Commit 9ba303fd authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: $FSLDIR/share/fsl/bin/ instead of $FSLDIR/share/bin/

parent b6f388ad
No related branches found
No related tags found
1 merge request!1Enh/create wrapper
Pipeline #6221 passed
#!/bin/sh
#
# Create wrapper scripts in $FSLDIR/share/bin/ which invoke commands that
# Create wrapper scripts in $FSLDIR/share/fsl/bin/ which invoke commands that
# are installed in $FSLDIR/bin/.
#
# This script is used to create isolated versions of all executables
......@@ -14,8 +14,8 @@
#
# Early versions of this script would create symlinks from $FSLDIR/bin/ into
# $FSLDIR/fslpython/envs/fslpython/bin/ (and, later, into
# $FSLDIR/share/bin/). However, wrapper scripts are now used instead to work
# around a couple of problems:
# $FSLDIR/share/fsl/bin/). However, wrapper scripts are now used instead to
# work around a couple of problems:
#
# - We need python executables to exclusively use the libraries installed in
# the FSL conda environment. Users may have other Python environments
......@@ -45,12 +45,18 @@ case "$PREFIX" in "$FSLDIR"*)
for script in $targets; do
sourceScript="${PREFIX}/bin/$script"
targetScript="${FSLDIR}/share/bin/$script"
targetScript="${FSLDIR}/share/fsl/bin/$script"
if [ ! -f "$sourceScript" ]; then
continue
fi
# create share/fsl/bin/ if it doesn't
# already exist
if [ ! -e "$FSLDIR/share/fsl/bin" ]; then
mkdir -p "$FSLDIR/share/fsl/bin"
fi
# remove target script if it already exists
if [ -e "$targetScript" ]; then
rm "$targetScript"
......
#!/bin/sh
#
# Remove wrapper script/links in $FSLDIR/share/bin/ which invoke commands
# Remove wrapper script/links in $FSLDIR/share/fsl/bin/ which invoke commands
# that are installed in $FSLDIR/bin/. See createFSLWrapper.sh for more
# information.
......@@ -14,7 +14,7 @@ fi
case "$PREFIX" in "$FSLDIR"*)
for script in $targets; do
targetScript="${FSLDIR}/share/bin/$script"
targetScript="${FSLDIR}/share/fsl/bin/$script"
if [ -f "$targetScript" ]; then
rm "$targetScript"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment