File: swlibs-nomore-csh

package info (click to toggle)
glide 2002.04.10ds1-15
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 59,556 kB
  • sloc: ansic: 290,125; asm: 23,305; sh: 8,089; pascal: 3,854; makefile: 1,276; perl: 73
file content (69 lines) | stat: -rw-r--r-- 1,233 bytes parent folder | download | duplicates (6)
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
Status: applied

Index: b/swlibs/include/make/ostype
===================================================================
--- a/swlibs/include/make/ostype
+++ b/swlibs/include/make/ostype
@@ -1,4 +1,4 @@
-#!/bin/csh -f
+#!/bin/bash
 #
 # $Log: ostype,v $
 # Revision 1.2  2000/06/15 00:11:40  joseph
@@ -20,33 +20,36 @@
 
 # if '-all' flag, return all supported architecture types
 
-if ( $#argv >= 1 ) then
-        if ( $1 == "-all" ) then
+if [ $# -ge 1 ]
+then
+        if [ $1 = "-all" ]
+        then
                 echo "hpux sunos solaris linux"
-                exit
-        endif
-endif
+                exit 0
+        fi
+fi
 
 # determine and return machine architecture type
 
-set a = `/bin/uname -s`
-switch ($a)
-case "HP-UX":
+a=$(/bin/uname -s)
+case $a in
+  "HP-UX")
     echo "hpux"
-    exit
-case "SunOS":
-    set b = `/bin/uname -r | /usr/bin/cut -c1`
-    if ($b > 4) then
+    ;;
+  "SunOS")
+    b=$(/bin/uname -r | /usr/bin/cut -c1)
+    if [ $b -gt 4 ]
+    then
         echo "solaris"
-        exit
     else
         echo "sunos"
-        exit
-    endif
-case "Linux":
+    fi
+    ;;
+  "Linux")
     echo "Linux"
-	exit
-default:
+    ;;
+  *)
     echo "unknown"
-	exit
-endsw
+    ;;
+esac
+