OSDN Git Service

Bug fixed: makegeneral ln Makfile -> cp Makefile
[eos/base.git] / sbin / MachineIndependent.REMOTE.13773~
1 #!/bin/sh
2 #
3 # MachineIndependent  1.14
4 #
5 # The latest update : 09/25/97 at 11:21:34
6 #
7 #@(#) MachineIndependent Function
8 #@(#)
9 #
10 #@(#) Usage : MachineIndependent 
11 #
12 #@(#) Attention
13 #@(#)
14 #@(#) Parameter:  Any
15 #@(#)
16
17 BASENAME=`basename $0`
18
19 case ${EOS_HOST} in
20         "hpux")
21                 OSTYPE=HP
22                 ;;
23         "alpha")
24                 OSTYPE=ALPHA
25                 ;;
26         "alphaLinux")
27                 OSTYPE=ALPHALINUX
28                 ;;
29         "alphaLinux5")
30                 OSTYPE=ALPHALINUX5
31                 ;;
32         "alphaOSF1")
33                 OSTYPE=ALPHAOSF1
34                 ;;
35         "i386Mac")
36                 OSTYPE=I386MAC
37                 ;;
38         "x86Mac64")
39                 OSTYPE=X86MAC64
40                 ;;
41         "i386Linux")
42                 OSTYPE=I386LINUX
43                 ;;
44         "i686Linux")
45                 OSTYPE=I686LINUX
46                 ;;
47         "x86Linux64")
48                 OSTYPE=X86LINUX64
49                 ;;
50         "cellLinux64")
51                 OSTYPE=CELLLINUX64
52                 ;;
53         "sgi")
54                 OSTYPE=SGI
55                 ;;
56         "sparc")
57                 OSTYPE=SPARC
58                 ;;
59         "apollo")
60                 OSTYPE=APOLLO
61                 ;;
62         *)
63                 echo "The environment variable, EOS_HOST, has not set yet." 
64                 echo "Or EOS_HOST=\"${EOS_HOST}\" is not supported yet."
65                 ;;
66 esac
67
68 #echo $OSTYPE
69 if [ -x ${EOS_HOME}/bin/shell/${BASENAME}/${BASENAME}.sh ]
70 then
71         # Shell Script
72         ${EOS_HOME}/bin/shell/${BASENAME}/${BASENAME}.sh $*
73 elif [ -x ${EOS_HOME}/bin/perl/${BASENAME}/${BASENAME}.pl ]
74 then
75         # Perl 
76         perl ${EOS_HOME}/bin/perl/${BASENAME}/${BASENAME}.pl $*
77         #
78 elif [ -x ${EOS_HOME}/bin/ruby/${BASENAME}/${BASENAME}.rb ]
79 then
80         # Ruby
81         ruby -I${EOS_HOME}/lib/${OSTYPE} -I${EOS_HOME}/lib -I${EOS_HOME}/bin/ruby/${BASENAME} ${EOS_HOME}/bin/ruby/${BASENAME}/${BASENAME}.rb $*
82         #
83 elif [ -x ${EOS_HOME}/bin/wish/${BASENAME}/${BASENAME}.wish ] 
84 then
85         # Wish
86         if [ -x ${EOS_HOME}/bin/${OSTYPE}/${BASENAME} ]
87         then
88                 ${EOS_HOME}/bin/${OSTYPE}/${BASENAME} $*        < ${EOS_HOME}/bin/wish/${BASENAME}/${BASENAME}.wish
89         elif [ -x ${EOS_ANOTHER_HOME}/bin/${OSTYPE}/${BASENAME} ]
90         then
91                 ${EOS_ANOTHER_HOME}/bin/${OSTYPE}/${BASENAME} $* < ${EOS_HOME}/bin/wish/${BASENAME}/${BASENAME}.wish
92         else
93                 echo "Not installed: ${OSTYPE}-vesion ${BASENAME}"      
94         fi
95 else
96         # No Wish 
97         if [ -x ${EOS_HOME}/bin/${OSTYPE}/${BASENAME} ]
98         then
99                 ${EOS_HOME}/bin/${OSTYPE}/${BASENAME} $*        
100         elif [ -x ${EOS_ANOTHER_HOME}/bin/${OSTYPE}/${BASENAME} ]
101         then
102                 ${EOS_ANOTHER_HOME}/bin/${OSTYPE}/${BASENAME} $*
103         else
104                 echo "Not installed: ${OSTYPE}-version ${BASENAME}"     
105         fi
106 fi
107
108 exit 0