summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/fsl/fsl_sub_v6.patch
blob: e209ba9282c92212e221b421fca66ab9a74f2467 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
--- a/src/sgeutils/fsl_sub	2020-07-25 09:36:17.000000000 -0500
+++ b/src/sgeutils/fsl_sub	2020-11-15 17:04:41.484972803 -0600
@@ -81,7 +81,7 @@
 # "NONE". Note that a user can unset SGE_ROOT if they don't want the
 # cluster to be used.
 ###########################################################################
-METHOD=SGE
+METHOD=NONE
 unset module
 if [[ "x$SGE_ROOT" = "x" ]] ; then
   METHOD=NONE
@@ -145,7 +145,10 @@
 
 usage ()
 {
-  cat <<EOF
+  case "$METHOD" in
+    SGE)
+  
+      cat <<EOF
 
 $command V1.1 - wrapper for job control system such as SGE
 
@@ -190,7 +193,24 @@
 bigmem.q:   This queue is like the verylong.q but has no memory limits.
 
 EOF
+      ;;
+    NONE)
+  
+      cat <<EOF
 
+$command V1.1 - wrapper for job control system such as SGE
+
+Usage: $command [options] <command>
+
+$command gzip *.img *.hdr
+
+  -t <filename>         Specify a task file of commands to execute in parallel
+  -l <logdirname>       Where to output logfiles
+  -v                    Verbose mode.
+
+EOF
+      ;;
+    esac
   exit 1
 }
 
@@ -199,14 +219,29 @@
   usage
 fi
 
-#if the newer whitespace-safe getopt format is available, use it
-if [[ $(getopt -T >/dev/null 2>&1; echo $?) == 4 ]]; then
-  eval set -- $(getopt -s bash T:q:a:p:M:j:t:z:N:R:Fvm:l:s: "$@")
-  result=$?
-else
-  set -- $(getopt T:q:a:p:M:j:t:z:N:R:Fvm:l:s: "$@")
-  result=$?
-fi
+case "$METHOD" in
+  SGE)
+    #if the newer whitespace-safe getopt format is available, use it
+    if [[ $(getopt -T >/dev/null 2>&1; echo $?) == 4 ]]; then
+      eval set -- $(getopt -s bash T:q:a:p:M:j:t:z:N:R:Fvm:l:s: "$@")
+      result=$?
+    else
+      set -- $(getopt T:q:a:p:M:j:t:z:N:R:Fvm:l:s: "$@")
+      result=$?
+    fi
+    ;;
+  NONE)
+    #if the newer whitespace-safe getopt format is available, use it
+    if [[ $(getopt -T >/dev/null 2>&1; echo $?) == 4 ]]; then
+      eval set -- $(getopt -s bash t:vl: "$@")
+      result=$?
+    else
+      set -- $(getopt t:vl: "$@")
+      result=$?
+    fi
+    ;;
+esac
+
 if [[ "$result" != 0 ]] ; then
   echo "What? Your arguments make no sense!"
 fi