-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcmsfscfg.sh
More file actions
executable file
·81 lines (69 loc) · 2.01 KB
/
cmsfscfg.sh
File metadata and controls
executable file
·81 lines (69 loc) · 2.01 KB
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
#!/bin/sh
#
#
# Name: CMSFSCFG SH (shell script)
# should be copied to 'configure' and executed
# See also: CMSFSSED SH (cmsfssed.sh)
# Author: Rick Troth, BMC Software, Inc., Houston, Texas, USA
# Date: 2000-Nov-03 (Fri)
# 2002-Nov-08 (Fri)
# 2024-01-30 (Wed)
#
#
#
# char set testing ^ ! ~ @ $ % & * [] {} `' \/ <> () "
# char set testing N E T A D P A A OC OC OC BF OC OC Q
# char set testing O X L T O C M S BB BB QQ SS AA PP O
# char set testing T C D L T P T KK RR TT LL NN RR T
#
#
#
if [ -z "$MAKE" ] ; then MAKE=make ; export MAKE ; fi
#
# be sure all shell scripts are executable
chmod +x *.sh ; RC="$?"
if [ "$RC" != 0 ] ; then exit $RC ; fi
#
# report
echo "***"
echo "*** UNAME says this is a `uname` system."
#
# stage configuration into a SED script
chmod +x cmsfssed.sh
rm -f cmsfscfg.sed
./cmsfssed.sh $* > cmsfscfg.sed ; RC="$?"
if [ "$RC" != 0 ] ; then exit $RC ; fi
#
# retrieve substitutions from the 'sed' operation
sh -c ' echo "PREFIX=%PREFIX%" ; \
echo "MODULES_DIRECTORY=%MODULES_DIRECTORY%" ; \
echo "DRIVER_SOURCE=%DRIVER_SOURCE%"' \
| sed -f cmsfscfg.sed > cmsfscfg.tmp
# s#%DEFINES%#-DCMSFS_HOST_ASCII#g
# s#%INCLUDES%##g
# s#%LINUX_RELEASE%#2.2#g
. ./cmsfscfg.tmp
rm cmsfscfg.tmp
#
# report
if [ ! -z "$PREFIX" ] ; then
echo "*** will install CMS FS utilities to '$PREFIX'" ; fi
if [ ! -z "$MODULES_DIRECTORY" ] ; then
echo "*** will install module to '$MODULES_DIRECTORY'" ; fi
if [ ! -z "$DRIVER_SOURCE" ] ; then
echo "*** using driver source '$DRIVER_SOURCE' for VFS" ; fi
#
# report
echo "***"
#
# run the makefile source through 'sed'
if [ -f makefile ] ; then mv makefile makefile-OLD ; fi
sed -f cmsfscfg.sed < cmsfs.makefile > makefile ; RC="$?"
if [ "$RC" != 0 ] ; then exit $RC ; fi
# and refresh the 'configure' script based on that
$MAKE configure > /dev/null ; RC="$?"
if [ "$RC" != 0 ] ; then exit $RC ; fi
#
# be sure we're set-up for the right driver
rm -f cmsfsvfs.c
$MAKE cmsfsvfs.c