summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Dawes <dawes@xfree86.org>2002-12-17 03:26:36 +0000
committerDavid Dawes <dawes@xfree86.org>2002-12-17 03:26:36 +0000
commit1e341fdfc38527d8614e2fe744237f473f3febee (patch)
treeeb04a1974c8947dc41e89a485bc72c04a683a07b
parent234397b42976f027df7acc41aae80ec43692d557 (diff)
Test for "ed" and "ex" -- part of update for LynxOS/PowerPC build fixes
(Stuart Lissaman).
-rwxr-xr-xsetfontdirs14
1 files changed, 12 insertions, 2 deletions
diff --git a/setfontdirs b/setfontdirs
index 4df6202..fa7b969 100755
--- a/setfontdirs
+++ b/setfontdirs
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $XFree86$
+# $XFree86: xc/lib/fontconfig/setfontdirs,v 1.4 2002/08/01 16:17:33 keithp Exp $
#
LANG=C
export LANG
@@ -9,7 +9,17 @@ trap "rm $FONTDIRS" 0
sh ./findfonts ${1+"$@"} > $FONTDIRS
cp fonts.conf.in fonts.conf
chmod +w fonts.conf
-ed fonts.conf << EOF
+EDITOR=ed
+(echo q | ed) > /dev/null 2>&1
+if [ $? -ne 0 ]; then
+ EDITOR=ex
+ (echo q | ex) > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ echo "$0: *** Error: Cannot find 'ed' or 'ex' editor"
+ exit 1
+ fi
+fi
+$EDITOR fonts.conf << EOF
/FONTPATH_END/a
<!-- Font directory list configured on `date` -->
.