CDE-DEMOS: remove references to Makefile.novell
[oweals/cde.git] / cde / admin / IntegTools / install.dt.dec.src
1 XCOMM $XConsortium: install.dt.dec.src /main/3 1996/11/19 11:43:45 drk $
2 XCOMM ==========================================================================
3 XCOMM ==========================================================================
4 XCOMM install.dt.dec.src
5 XCOMM
6 XCOMM   Platform specific function overrides for the April 1994 Snapshot
7 XCOMM   install script, install.dt. 
8 XCOMM
9 XCOMM   This file is sourced by the install.dt script to allow platform
10 XCOMM   specific behavior for certain functionality. These functions are:
11 XCOMM
12 XCOMM   DtiClearScreen() - clear the screen
13 XCOMM   DtiFreeSpace() - return available bytes in a directory
14 XCOMM   DtiVerifyConfiguration() - verify system configuration
15 XCOMM   DtiWhoami() - return user name
16 XCOMM
17 XCOMM ==========================================================================
18 XCOMM ==========================================================================
19 XCOMM
20 XCOMM DtiClearScreen() - clears the screen
21 XCOMM
22 XCOMM The default DtiClearScreen() uses the 'clear' command to clear the
23 XCOMM screen. If this platform does not have the 'clear' command, 
24 XCOMM declare DtiClearScreen() here with the appropriate functionality.
25 XCOMM
26 XCOMM Note: The default DtiClearScreen() writes to stderr, rather than stdout,
27 XCOMM so be sure to do the same here. DtiPrint() does this automatically, so
28 XCOMM use it if possible.
29 XCOMM 
30 XCOMM Example:
31 XCOMM
32 XCOMM DtiClearScreen()
33 XCOMM {
34 XCOMM   DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
35 XCOMM   DtiPrint "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
36 XCOMM }
37 XCOMM
38 XCOMM Input - none
39 XCOMM Output - none
40 XCOMM Return -none
41 XCOMM ==========================================================================
42
43 XCOMM DtiClearScreen() {
44 XCOMM   clear 1>&2
45 XCOMM }
46
47 XCOMM ==========================================================================
48 XCOMM
49 XCOMM DtiFreeSpace
50 XCOMM
51 XCOMM The default DtiFreeSpace() does not check for free space, rather it
52 XCOMM simply returns a BigNumber that install.dt will assume is large 
53 XCOMM enough in which to install the desktop. 
54 XCOMM
55 XCOMM Declare DtiFreeSpace() here to return the actual available space for
56 XCOMM a particular directory.
57 XCOMM
58 XCOMM The $1 parameter will contain the directory name to test. The directory 
59 XCOMM specified will exist. DtiFreeSpace() should return the number of bytes
60 XCOMM available via the DtiReturn() function. 
61 XCOMM
62 XCOMM Input
63 XCOMM   $1 - directory name
64 XCOMM Output - none
65 XCOMM Return
66 XCOMM   number of bytes available
67 XCOMM
68 XCOMM ==========================================================================
69
70 DtiFreeSpace()
71 {
72     BDFOUT=`df -k $1 | awk '{print $4}'`
73     for i in $BDFOUT
74     do
75         if [ "$i" != "Avail" ]
76         then
77             i=`expr $i \* 1024`
78             DtiReturn "$i"
79         fi
80     done
81 }
82
83 XCOMM ==========================================================================
84 XCOMM
85 XCOMM DtiVerifyConfiguration
86 XCOMM
87 XCOMM The default DtiVerifyConfiguration() does no system configuration 
88 XCOMM testing. For a particular platform, one might want to test for
89 XCOMM the presence of X11R5 or the OS version, for example, before allowing
90 XCOMM the desktop to be installed.
91 XCOMM
92 XCOMM Declare this function to make such platform specific tests. Return
93 XCOMM "yes" if the system passed, or "<message text>" if the system failed
94 XCOMM in which case install.dt will display the <message text> as the reason.
95 XCOMM
96 XCOMM Input - none
97 XCOMM Output - none
98 XCOMM Return 
99 XCOMM   "yes" - system configuration verified
100 XCOMM   "<message text>" - verification failed, display message text
101 XCOMM
102 XCOMM ==========================================================================
103
104 XCOMM DtiVerifyConfiguration()
105 XCOMM {
106 XCOMM   DtiReturn "yes"
107 XCOMM }
108
109 XCOMM ==========================================================================
110 XCOMM
111 XCOMM DtiWhoami
112 XCOMM
113 XCOMM The default DtiWhoami() uses the 'whoami' command to determine
114 XCOMM the user name. If this platform does not have the 'whoami' command,
115 XCOMM declare DtiWhoami() here with the appropriate functionality.
116 XCOMM
117 XCOMM Input - none
118 XCOMM Output - none
119 XCOMM Return
120 XCOMM   result of system 'whoami' command
121 XCOMM
122 XCOMM ==========================================================================
123
124 DtiWhoami()
125 {
126   /usr/bin/whoami
127 }
128