]> andersk Git - moira.git/blame - gen/print.sh
redo genwords as an embedded sql program and have it output in a format
[moira.git] / gen / print.sh
CommitLineData
bc275f50 1#! /bin/sh
2# $Id$
3
4# The following exit codes are defined and MUST BE CONSISTENT with the
5# error codes the library uses:
6MR_MISSINGFILE=47836473
7MR_MKCRED=47836474
8MR_TARERR=47836476
9
5bef82c1 10PATH=/bin
bc275f50 11TARFILE=/var/tmp/print.out
12PCLOCAL=/etc/printcap.local
13PCGEN=/etc/printcap.moira
14PRINTCAP=/etc/printcap
15
16# Alert if the tar file or other needed files do not exist
17test -r $TARFILE || exit $MR_MISSINGFILE
18test -r $PCLOCAL || exit $MR_MISSINGFILE
19
20# Unpack the tar file, getting only files that are newer than the
21# on-disk copies (-u).
22cd /
5bef82c1 23pax -ru -p o -f $TARFILE
bc275f50 24
25# Build full printcap
26cat $PCLOCAL $PCGEN > $PRINTCAP
27
28# cleanup
29test -f $TARFILE && rm -f $TARFILE
30test -f $0 && rm -f $0
31
32exit 0
33
This page took 0.049583 seconds and 5 git commands to generate.