annotate etc/check_cygwin_setup.sh @ 814:a634e3b7acc8

[xemacs-hg @ 2002-04-14 12:41:59 by ben] latest changes TODO.ben-mule-21-5: Update. make-docfile.c: Add basic support for handling ISO 2022 doc strings -- we parse the basic charset designation sequences so we know whether we're in ASCII and have to pay attention to end quotes and such. Reformat code according to coding standards. abbrev.el: Add `global-abbrev-mode', which turns on or off abbrev-mode in all buffers. Added `defining-abbrev-turns-on-abbrev-mode' -- if non-nil, defining an abbrev through an interactive function will automatically turn on abbrev-mode, either globally or locally depending on the command. This is the "what you'd expect" behavior. indent.el: general function for indenting a balanced expression in a mode-correct way. Works similar to indent-region in that a mode can specify a specific command to do the whole operation; if not, figure out the region using forward-sexp and indent each line using indent-according-to-mode. keydefs.el: Removed. Modify M-C-backslash to do indent-region-or-balanced-expression. Make S-Tab just insert a TAB char, like it's meant to do. make-docfile.el: Now that we're using the call-process-in-lisp, we need to load an extra file win32-native.el because we're running a bare temacs. menubar-items.el: Totally redo the Cmds menu so that most used commands appear directly on the menu and less used commands appear in submenus. The old way may have been very pretty, but rather impractical. process.el: Under Windows, don't ever use old-call-process-internal, even in batch mode. We can do processes in batch mode. subr.el: Someone recoded truncate-string-to-width, saying "the FSF version is too complicated and does lots of hard-to-understand stuff" but the resulting recoded version was *totally* wrong! it misunderstood the basic point of this function, which is work in *columns* not chars. i dumped ours and copied the version from FSF 21.1. Also added truncate-string-with-continuation-dots, since this idiom is used often. config.inc.samp, xemacs.mak: Separate out debug and optimize flags. Remove all vestiges of USE_MINIMAL_TAGBITS, USE_INDEXED_LRECORD_IMPLEMENTATION, and GUNG_HO, since those ifdefs have long been removed. Make error-checking support actually work. Some rearrangement of config.inc.samp to make it more logical. Remove callproc.c and ntproc.c from xemacs.mak, no longer used. Make pdump the default. lisp.h: Add support for strong type-checking of Bytecount, Bytebpos, Charcount, Charbpos, and others, by making them classes, overloading the operators to provide integer-like operation and carefully controlling what operations are allowed. Not currently enabled in C++ builds because there are still a number of compile errors, and it won't really work till we merge in my "8-bit-Mule" workspace, in which I make use of the new types Charxpos, Bytexpos, Memxpos, representing a "position" either in a buffer or a string. (This is especially important in the extent code.) abbrev.c, alloc.c, eval.c, buffer.c, buffer.h, editfns.c, fns.c, text.h: Warning fixes, some of them related to new C++ strict type checking of Bytecount, Charbpos, etc. dired.c: Caught an actual error due to strong type checking -- char len being passed when should be byte len. alloc.c, backtrace.h, bytecode.c, bytecode.h, eval.c, sysdep.c: Further optimize Ffuncall: -- process arg list at compiled-function creation time, converting into an array for extra-quick access at funcall time. -- rewrite funcall_compiled_function to use it, and inline this function. -- change the order of check for magic stuff in SPECBIND_FAST_UNSAFE to be faster. -- move the check for need to garbage collect into the allocation code, so only a single flag needs to be checked in funcall. buffer.c, symbols.c: add debug funs to check on mule optimization info in buffers and strings. eval.c, emacs.c, text.c, regex.c, scrollbar-msw.c, search.c: Fix evil crashes due to eistrings not properly reinitialized under pdump. Redo a bit some of the init routines; convert some complex_vars_of() into simple vars_of(), because they didn't need complex processing. callproc.c, emacs.c, event-stream.c, nt.c, process.c, process.h, sysdep.c, sysdep.h, syssignal.h, syswindows.h, ntproc.c: Delete. Hallelujah, praise the Lord, there is no god but Allah!!! fix so that processes can be invoked in bare temacs -- thereby eliminating any need for callproc.c. (currently only eliminated under NT.) remove all crufty and unnecessary old process code in ntproc.c and elsewhere. move non-callproc-specific stuff (mostly environment) into process.c, so callproc.c can be left out under NT. console-tty.c, doc.c, file-coding.c, file-coding.h, lstream.c, lstream.h: fix doc string handling so it works with Japanese, etc docs. change handling of "character mode" so callers don't have to manually set it (quite error-prone). event-msw.c: spacing fixes. lread.c: eliminate unused crufty vintage-19 "FSF defun hack" code. lrecord.h: improve pdump description docs. buffer.c, ntheap.c, unexnt.c, win32.c, emacs.c: Mule-ize some unexec and startup code. It was pseudo-Mule-ized before by simply always calling the ...A versions of functions, but that won't cut it -- eventually we want to be able to run properly even if XEmacs has been installed in a Japanese directory. (The current problem is the timing of the loading of the Unicode tables; this will eventually be fixed.) Go through and fix various other places where the code was not Mule-clean. Provide a function mswindows_get_module_file_name() to get our own name without resort to PATH_MAX and such. Add a big comment in main() about the problem with Unicode table load timing that I just alluded to. emacs.c: When error-checking is enabled (interpreted as "user is developing XEmacs"), don't ask user to "pause to read messages" when a fatal error has occurred, because it will wedge if we are in an inner modal loop (typically when a menu is popped up) and make us unable to get a useful stack trace in the debugger. text.c: Correct update_entirely_ascii_p_flag to actually work. lisp.h, symsinit.h: declarations for above changes.
author ben
date Sun, 14 Apr 2002 12:43:31 +0000
parents 98fb34b6fbe9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 #! bash
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 yorn()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 echo -n " [y/n] "
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 read YN junk
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 if [ "$YN" = "n" ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 return -1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 return 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 echo -n "checking for cygwin..."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 if ! uname -v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 echo "couldn't find uname please add cygwin to your path."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 exit -1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 OSversion="`uname -v | sed 's/^\(.\).*$/\1/'`"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 shell=`type sh | sed 's/sh is //'`
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 distdir=`dirname $shell | sed 's!^//\(.\)/\(.*\)!\1:/\2!'`
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 echo "cygwin installed in $distdir"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 echo "checking paths ..."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 if [ ! -d "/bin" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 echo "You don't have a /bin directory. Would you like to mount cygwin as /bin ?"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 if yorn; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 mkdir /bin
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 mount -b $distdir /bin
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 fi
503
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
38 #this appears bogus. --ben
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
39 #elif [ "$distdir" != "/bin" ]; then
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
40 # echo "Warning: you have /bin but it's not the cygwin installation."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 if [ ! -d "/tmp" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 echo -n "You don't have /tmp - create it?"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 if yorn; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 mkdir /tmp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 echo "you have /tmp"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 if [ ! -d "/etc" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 echo -n "You don't have /etc - create it?"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 if yorn; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 mkdir /etc
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 echo "you have /etc"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 if [ -d "/etc" ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 if [ ! -f "/etc/termcap" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 echo -n "You don't have /etc/termcap - create it?"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 if yorn; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 if [ ! -f "$distdir/../etc/termcap" ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 distdir=`mount | grep "$distdir" | sed -e "s/ .*$//"`
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 echo "Retrieving termcap from $distdir/../etc"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 if [ -f "$distdir/../etc/termcap" ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 cp "$distdir/../etc/termcap" /etc
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 echo "Error: can't find termcap file"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 echo "you have /etc/termcap"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 if [ ! -f "/etc/passwd" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 echo -n "You don't have /etc/passwd - create it?"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 if yorn; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 if [ "$OS" = "Windows_NT" ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 echo -n "Running on NT, create domain or local password file [d/l] "
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 read DL junk
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 if [ "$DL" = "d" ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 mkpasswd -d > /etc/passwd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 mkpasswd -l > /etc/passwd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 echo "Please enter your userid e.g. andyp"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 read userid junk
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 echo "Please enter your user name e.g. Andy Piper"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 read username junk
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 echo "Administrator::500:513:::/bin/sh" > /etc/passwd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 echo "$userid::1000:513:$username::/bin/sh" >> /etc/passwd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 echo "you have /etc/passwd"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 userid=`id | sed -e "s/[^(]*(\([^)]*\)).*/\1/"`
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 echo "userid is $userid"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 if [ ! -f "/etc/group" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 echo -n "You don't have /etc/group - create it?"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 if yorn; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 if [ "$OS" = "Windows_NT" ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 echo -n "Running on NT, create domain or local group file [d/l] "
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 read DL junk
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 if [ "$DL" = "d" ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 mkgroup -d > /etc/group
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 mkgroup -l > /etc/group
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 echo "None::513:" > /etc/group
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 echo "Everyone::0:" >> /etc/group
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 echo "you have /etc/group"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132
503
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
133 # this is bogus. i have no hosts file and no problems. --ben
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
134 # if [ ! -f "/etc/hosts" ]; then
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
135 # echo -n "You don't have /etc/hosts - create it?"
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
136 # if yorn; then
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
137 # mname=`uname -n`
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
138 # echo "Machine name is $mname"
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
139 # echo -n "Please enter your ip address "
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
140 # read mipaddr junk
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
141 # echo "$mname $mipaddr" > /etc/hosts
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
142 # echo "localhost 127.0.0.1" >> /etc/hosts
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
143 # fi
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
144 # else
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
145 # echo "you have /etc/hosts"
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
146 # fi
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 echo "Can't create /etc files because /etc does not exist"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 echo "checking environment ..."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 if [ "$HOME" = "" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 echo -n "HOME is not set, rectify?"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 if yorn; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 if [ "$OS" = "Windows_NT" ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 echo "please enter your home path [/winnt/profiles/$userid]"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 read HOME junk
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 if [ "$HOME" = "" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 HOME="/winnt/profiles/$userid"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 echo "please enter your home path [/]"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 read HOME junk
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 if [ "$HOME" = "" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 HOME="/"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 echo "HOME=$HOME; export HOME" >> $HOME/.bashrc
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 echo "HOME is $HOME"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 if [ "$TERM" != "ansi" -a "$TERM" != "linux" ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 echo -n "TERM is not set to linux or ansi, rectify?"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 if yorn; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 echo "TERM=linux; export TERM" >> $HOME/.bashrc
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 echo "TERM is $TERM"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185
503
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
186 if echo $CYGWIN | grep -w tty > /dev/null; then
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
187 echo "CYGWIN is $CYGWIN"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 else
503
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
189 echo "CYGWIN does not contain \"tty\"; you may experience problems with
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
190 subprocess or terminal handling. To rectify this add CYGWIN=tty to
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
191 your environment. (Note this cannot be done in bash as it needs to be
98fb34b6fbe9 [xemacs-hg @ 2001-05-04 23:31:31 by ben]
ben
parents: 428
diff changeset
192 read when cygwin1.dll initializes.)"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 fi