diff options
Diffstat (limited to 'mcon/U/Config_sh.U')
-rw-r--r-- | mcon/U/Config_sh.U | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/mcon/U/Config_sh.U b/mcon/U/Config_sh.U index 3f9316c..3d71a2e 100644 --- a/mcon/U/Config_sh.U +++ b/mcon/U/Config_sh.U @@ -1,12 +1,12 @@ -?RCS: $Id: Config_sh.U,v 3.0.1.3 1997/02/28 14:57:53 ram Exp $ +?RCS: $Id$ ?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. +?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Config_sh.U,v $ ?RCS: Revision 3.0.1.3 1997/02/28 14:57:53 ram @@ -28,17 +28,24 @@ ?X: here document redirection with variable substitution). ?X: ?MAKE:Config_sh: cf_time cf_by test spitshell startsh myuname Myread \ - End Obsol_sh Loc +d_portable package src + End Obsol_sh Loc +d_portable package src cat sed ?MAKE: -pick add.Config_sh $@ %< ?MAKE: -pick add $@ ./Obsol_sh ?MAKE: -pick close.Config_sh $@ %< -?F:!config.over -?T:file +?F:!config.over !config.arch +?T:file sfile xsed +?LINT:unclosed EOT : back to where it started if test -d ../UU; then cd .. fi +: configuration may be unconditionally patched via a 'config.arch' file +if $test -f config.arch; then + echo "I see a config.arch file, loading it." >&4 + . ./config.arch +fi + : configuration may be patched via a 'config.over' file if $test -f config.over; then echo " " @@ -59,13 +66,19 @@ fi ?X: Strip down paths in located executables. For each file, e.g. vi, there ?X: is a $vi variable whose value is for instance '/usr/bin/vi'. By resetting ?X: $vi to 'vi', we rely on the PATH variable to locate the executable... +?X: In order to allow vi='/usr/bin/nvi' which will strip down to vi='nvi', +?X: we can't just say 'eval $file="\$file"', we have to recourse to sed. +?X: We don't use basename since it is less portable than sed. ?X: case "$d_portable" in "$define") echo " " echo "Stripping down executable paths..." >&4 + xsed=$sed for file in $loclist $trylist; do - eval $file="\$file" + eval sfile="\$$file" + sfile=`echo $sfile | $xsed -e 's,.*/\(.*\),\1,'` + eval $file="$sfile" done ;; esac @@ -89,3 +102,9 @@ $startsh # Configured by : $cf_by # Target system : $myuname +EOT +?X: Command line options are saved by the Options.U unit in the +?X: temporary file UU/cmdline.opt +$test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh +$spitshell <<EOT >>config.sh + |