diff --git a/share/fsl/sbin/createFSLWrapper b/share/fsl/sbin/createFSLWrapper index c804c9c6a962aadfa22b64f0d67a7c4e48c113fb..8eefbe873615ddfb73a854b2016be5d1c292189b 100755 --- a/share/fsl/sbin/createFSLWrapper +++ b/share/fsl/sbin/createFSLWrapper @@ -76,8 +76,9 @@ for script in $targets; do # <Command>_gui. Here, we remove the _gui suffix # if no source file exists (in which we are # likely running on Linux) - if [ "$sourceScript" = *"_gui" ] && [ ! -f "$sourceScript" ]; then - sourceScript=${sourceScript/_gui/} + if [[ "$script" == *"_gui" ]] && [ ! -f "$sourceScript" ]; then + script=${script/_gui/} + sourceScript="${PREFIX}/bin/$script" fi targetScript="${FSLDIR}/share/fsl/bin/$script" diff --git a/share/fsl/sbin/removeFSLWrapper b/share/fsl/sbin/removeFSLWrapper index feecb9f8727cd0da7552beefbbfc0246ef3ca52e..8b42934c2681e3eb011ea67bc1b76d36c2d377e5 100755 --- a/share/fsl/sbin/removeFSLWrapper +++ b/share/fsl/sbin/removeFSLWrapper @@ -33,7 +33,7 @@ for script in $targets; do targetScript="${FSLDIR}/share/fsl/bin/$script" # See comment about FSL GUIs in post-link.sh - if [ "$targetScript" = *"_gui" ] && [ ! -f "$targetScript" ]; then + if [[ "$targetScript" == *"_gui" ]] && [ ! -f "$targetScript" ]; then targetScript=${targetScript/_gui/} fi