-
-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ANTSPATH #1574
Remove ANTSPATH #1574
Conversation
Got all of them. To be noted, |
def34a9
to
7fa9a00
Compare
Most of the scripts still need some work - removing ANTSPATH references is not sufficient because many of the checks for programs will fail. Eg
can't be replaced with
but rather needs to be Is it OK if I push to your branch? |
Sure, go for it 👍
Le mar. 25 juil. 2023, 13:43, Philip Cook ***@***.***> a
écrit :
… Most of the scripts still need some work - removing ANTSPATH references is
not sufficient because many of the checks for programs will fail.
Eg
-s "${ANTSPATH}ANTS"
can't be replaced with
-s "ANTS"
but rather needs to be -s $(which ANTS).
Is it OK if I push to your branch?
—
Reply to this email directly, view it on GitHub
<#1574 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAO7U37PMUF5D5LIMN3JZM3XSAAVDANCNFSM6AAAAAA2XGVCF4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
POSIX check for a command is |
PR updated with |
if [[ ! -f "${ANTSPATH}/ANTS" ]] ; then | ||
echo "Cannot find the ANTS program. Please \(re\)define \$ANTSPATH in your environment." | ||
|
||
if ! command -v "ANTS" &> /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need the square brackets still
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works without brackets on my machine. I used the pattern in the accepted answer of the SO thread linked above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Make ANTS disappear from PATH.
$ mv $HOME/.local/ants/bin/ANTS{,.bak}
# Run wrapper script.
$ ./Scripts/ants.sh
Cannot find the ANTS program. Please \(re\)define $PATH in your environment.
# Put it back.
$ mv $HOME/.local/ants/bin/ANTS{.bak,}
# Run wrapper script again.
$ ./Scripts/ants.sh
USAGE ::
sh ants.sh ImageDimension fixed.ext moving.ext OPTIONAL-OUTPREFIX OPTIONAL-max-iterations OPTIONAL-Labels-In-Fixed-Image-Space-To-Deform-To-Moving-
Looking good now @ghisvail |
Thanks for doing this @ghisvail |
Closes #1573