jargon lookup, part 02 of 02

Richard L. Goerwitz goer at ellis.uchicago.edu
Fri Apr 5 02:02:32 AEST 1991


---- Cut Here and feed the following to sh ----
#!/bin/sh
# this is jargon.02 (part 2 of a multipart archive)
# do not concatenate these parts, unpack them in order with /bin/sh
# file README continued
#
if test ! -r _shar_seq_.tmp; then
	echo 'Please unpack part 1 first!'
	exit 1
fi
(read Scheck
 if test "$Scheck" != 2; then
	echo Please unpack part "$Scheck" next!
	exit 1
 else
	exit 0
 fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
	echo 'x - still skipping README'
else
echo 'x - continuing file README'
sed 's/^X//' << 'SHAR_EOF' >> 'README' &&
Xdatabase file in a different directory than the current one, then you
Xshould copy the jargon.wrd file to that directory, and then type
X
X	(ficonx) idxtext DATABASE
X
Xwhere DATABASE gives the full path of your jargon.wrd file.  Running
Xthis command may take a minute, so be patient.
X
XNote that I have not tried installing jargon on anything but a Unix
Xsystem, so I have no idea how it will work.  In particular, there
Xmight be difficulties on systems for which newline translation is
Xnecessary.
X
X-------
X
XAdmission:
X
XJargon is really just a cheap trick I use to get people to test a
Xsmall text retrieval package.  This package is fully documented in the
Xfiles
X
X    gettext.icn
X    adjuncts.icn
X    idxtext.icn
X
XIcon programmers will find gettext a nice, easy way to access
Xkey/value combinations from a file (rather than from a hash table in
Xmemory).  Often the practicalities of memory usage lead one to avoid
Xhuge in-core hash tables.  The gettext package provides a small-scale,
Xbut fairly efficient, alternative.
X
X-------
X
XProblems:
X
XThis program works fine on a Xenix/386 box.  Your mileage may vary.
XIf there are problems, I'd like to hear about them.  Send mail to:
X
XRichard Goerwitz (goer at sophist.uchicago.edu)
X
SHAR_EOF
echo 'File README is complete' &&
true || echo 'restore of README failed'
rm -f _shar_wnt_.tmp
fi
# ============= Makefile.dist ==============
if test -f 'Makefile.dist' -a X"$1" != X"-c"; then
	echo 'x - skipping Makefile.dist (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting Makefile.dist (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Makefile.dist' &&
X# Don't change this unless you're absolutely sure of what you're doing.
XPROGNAME = jargon
X
X# You may need to change these.
XICONC = /usr/icon/v8/bin/icont
XJARGONFILE = ./jargon2.8.2
X
X# Please edit these to reflect your local file structure & conventions.
XDESTDIR = /usr/local/bin
XLIBDIR = /usr/local/lib/$(PROGNAME)
XOWNER = bin
XGROUP = bin
X
X# I hope you won't have to use this.
XDEBUGFLAG = #-t
X
XSHELL = /bin/sh
X# Source files for $(PROGNAME).
XSRC1 = $(PROGNAME).icn gettext.icn adjuncts.icn
X
Xall: jargon.wrd $(PROGNAME)
X	@echo "\nEverything seems OK.  Go ahead & install.\n"
X
Xjargon.wrd: jarg2get idxtext
X	test -f $(JARGONFILE)
X	./jarg2get < $(JARGONFILE) > jargon.wrd
X	@echo "\nThis may take a few minutes:\n"
X	./idxtext jargon.wrd
X
X$(PROGNAME): $(SRC1)
X	$(ICONC) $(DEBUGFLAG) -o $@ $?
X
Xidxtext: idxtext.icn adjuncts.icn
X	$(ICONC) $(DEBUGFLAG) -o $@ $?
X
Xjarg2get: jarg2get.icn
X	$(ICONC) $(DEBUGFLAG) -o $@ $?
X
X
X# Set pathnames to their correct values for this system.
X$(PROGNAME).icn:
X	sed "s|/usr/local/lib/$(PROGNAME)/jargon.wrd|$(LIBDIR)/jargon.wrd|g" < jargon.src > jargon.icn
X
X# Pessimistic assumptions regarding the environment (in particular,
X# I don't assume you have the BSD "install" shell script).
Xinstall: all
X	test -d $(DESTDIR) || (mkdir $(DESTDIR) && chmod 755 $(DESTDIR))
X	cp $(PROGNAME) $(DESTDIR)/
X	chgrp $(GROUP) $(DESTDIR)/$(PROGNAME)
X	chown $(OWNER) $(DESTDIR)/$(PROGNAME)
X	test -d $(LIBDIR) || (mkdir $(LIBDIR) && chmod 755 $(LIBDIR))
X	cp jargon.wrd $(LIBDIR)/
X	chgrp $(GROUP) $(LIBDIR)/jargon.wrd
X	chown $(OWNER) $(LIBDIR)/jargon.wrd
X	@echo "\nThis may take a few minutes:\n"
X	./idxtext $(LIBDIR)/jargon.wrd
X	chgrp $(GROUP) $(LIBDIR)/*IDX
X	chown $(OWNER) $(LIBDIR)/*IDX
X	./$(PROGNAME) zork
X	@echo "\nEverything checks out OK.  Installation done.\n"
X
Xclean:
X	-rm -f core *~ .u? *.IDX $(PROGNAME)
X
Xclobber: clean
X	echo "Be careful in answering the following rm queries!"
X	-rm -i $(PROGNAME).icn jargon.wrd
X
SHAR_EOF
true || echo 'restore of Makefile.dist failed'
rm -f _shar_wnt_.tmp
fi
rm -f _shar_seq_.tmp
echo You have unpacked the last part
exit 0
-- 

   -Richard L. Goerwitz              goer%sophist at uchicago.bitnet
   goer at sophist.uchicago.edu         rutgers!oddjob!gide!sophist!goer



More information about the Alt.sources mailing list