Skip to content
Snippets Groups Projects
Commit 7acf121f authored by Duncan Mortimer's avatar Duncan Mortimer
Browse files

Changed usage to exit with 1 when command line used incorrectly

parent 79e29dfc
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
if [ _${2} = _ ] ; then if [ _${2} = _ ] ; then
echo "Usage: lesions <t1_root> <t2_root> [-f]" echo "Usage: lesions <t1_root> <t2_root> [-f]"
echo "-f : second image is FLAIR not t2" echo "-f : second image is FLAIR not t2"
exit exit 1
fi fi
nclasses=3 nclasses=3
......
...@@ -15,7 +15,7 @@ if [ _$2 = _ ] ; then ...@@ -15,7 +15,7 @@ if [ _$2 = _ ] ; then
echo "Usage: lesions <t1_root> <t2_root> [-f] [-lt <thr>]" echo "Usage: lesions <t1_root> <t2_root> [-f] [-lt <thr>]"
echo "-f : second image is FLAIR not T2" echo "-f : second image is FLAIR not T2"
echo "-lt <thr> : set lesion threshold (default 0.5)" echo "-lt <thr> : set lesion threshold (default 0.5)"
exit exit 1
fi fi
A=$1 A=$1
......
...@@ -16,7 +16,7 @@ if [ _$2 = _ ] ; then ...@@ -16,7 +16,7 @@ if [ _$2 = _ ] ; then
echo "Usage: lesions <t1_root> <t2_root> [-f] [-lt <thr>]" echo "Usage: lesions <t1_root> <t2_root> [-f] [-lt <thr>]"
echo "-f : second image is FLAIR not T2" echo "-f : second image is FLAIR not T2"
echo "-lt <thr> : set lesion threshold (default 0.5)" echo "-lt <thr> : set lesion threshold (default 0.5)"
exit exit 1
fi fi
A=$1 A=$1
......
...@@ -21,7 +21,7 @@ Usage() { ...@@ -21,7 +21,7 @@ Usage() {
echo "-b <b> : ignore from b (mm) downwards in MNI152/Talairach space; b should probably be -ve" echo "-b <b> : ignore from b (mm) downwards in MNI152/Talairach space; b should probably be -ve"
echo "-S \"sienadiffopts\" : options to pass to siena_diff timepoint differencing (inside double-quotes), e.g. -S \"-s -i 20\"" echo "-S \"sienadiffopts\" : options to pass to siena_diff timepoint differencing (inside double-quotes), e.g. -S \"-s -i 20\""
echo "" echo ""
exit exit 1
} }
if [ _$FSLDIR = _ ] ; then if [ _$FSLDIR = _ ] ; then
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
Usage() { Usage() {
echo "Usage: siena_flow2std <fileroot2> <fileroot2> [-d]" echo "Usage: siena_flow2std <fileroot2> <fileroot2> [-d]"
echo "-d : debug (don't delete intermediate files)" echo "-d : debug (don't delete intermediate files)"
exit exit 1
} }
if [ _$FSLDIR = _ ] ; then if [ _$FSLDIR = _ ] ; then
......
...@@ -22,7 +22,7 @@ Usage() { ...@@ -22,7 +22,7 @@ Usage() {
echo "-lm <mask> : use lesion (or lesion+CSF) mask to remove incorrectly labelled \"grey matter\" voxels" echo "-lm <mask> : use lesion (or lesion+CSF) mask to remove incorrectly labelled \"grey matter\" voxels"
echo "-S \"segopts\" : options to pass to FAST segmentation (inside double-quotes), e.g. -S \"-i 20\"" echo "-S \"segopts\" : options to pass to FAST segmentation (inside double-quotes), e.g. -S \"-i 20\""
echo "" echo ""
exit exit 1
} }
if [ _$FSLDIR = _ ] ; then if [ _$FSLDIR = _ ] ; then
......
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