From 7acf121fb773b3fde7864d6f7fa3631616ed3744 Mon Sep 17 00:00:00 2001
From: Duncan Mortimer <duncan.mortimer@ndcn.ox.ac.uk>
Date: Tue, 17 Jul 2007 15:50:59 +0000
Subject: [PATCH] Changed usage to exit with 1 when command line used
 incorrectly

---
 lesions_0.1    | 2 +-
 lesions_0.2    | 2 +-
 lesions_0.3    | 2 +-
 siena          | 2 +-
 siena_flow2std | 2 +-
 sienax         | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lesions_0.1 b/lesions_0.1
index 18efd9f..af7f40c 100755
--- a/lesions_0.1
+++ b/lesions_0.1
@@ -14,7 +14,7 @@
 if [ _${2} = _ ] ; then
     echo "Usage:  lesions <t1_root> <t2_root> [-f]"
     echo "-f   :  second image is FLAIR not t2"
-    exit
+    exit 1
 fi
 
 nclasses=3
diff --git a/lesions_0.2 b/lesions_0.2
index 831e8a4..88aa1aa 100755
--- a/lesions_0.2
+++ b/lesions_0.2
@@ -15,7 +15,7 @@ if [ _$2 = _ ] ; then
     echo "Usage:  lesions <t1_root> <t2_root> [-f] [-lt <thr>]"
     echo "-f        :  second image is FLAIR not T2"
     echo "-lt <thr> :  set lesion threshold (default 0.5)"
-    exit
+    exit 1
 fi
 
 A=$1
diff --git a/lesions_0.3 b/lesions_0.3
index 8d42391..09abe2b 100644
--- a/lesions_0.3
+++ b/lesions_0.3
@@ -16,7 +16,7 @@ if [ _$2 = _ ] ; then
     echo "Usage:  lesions <t1_root> <t2_root> [-f] [-lt <thr>]"
     echo "-f        :  second image is FLAIR not T2"
     echo "-lt <thr> :  set lesion threshold (default 0.5)"
-    exit
+    exit 1
 fi
 
 A=$1
diff --git a/siena b/siena
index a2f30bb..2bd80c6 100755
--- a/siena
+++ b/siena
@@ -21,7 +21,7 @@ Usage() {
     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 ""
-    exit
+    exit 1
 }
 
 if [ _$FSLDIR = _ ] ; then
diff --git a/siena_flow2std b/siena_flow2std
index e266b2c..abc9a15 100755
--- a/siena_flow2std
+++ b/siena_flow2std
@@ -12,7 +12,7 @@
 Usage() {
     echo "Usage: siena_flow2std <fileroot2> <fileroot2> [-d]"
     echo "-d : debug (don't delete intermediate files)"
-    exit
+    exit 1
 }
 
 if [ _$FSLDIR = _ ] ; then
diff --git a/sienax b/sienax
index 107ad81..07b91df 100755
--- a/sienax
+++ b/sienax
@@ -22,7 +22,7 @@ Usage() {
     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 ""
-    exit
+    exit 1
 }
 
 if [ _$FSLDIR = _ ] ; then
-- 
GitLab