]> andersk Git - moira.git/blob - gen/print.sh
update to what we've been running forever
[moira.git] / gen / print.sh
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:
6 MR_MISSINGFILE=47836473
7 MR_MKCRED=47836474
8 MR_TARERR=47836476
9
10 PATH=/bin
11 TARFILE=/var/tmp/print.out
12 PCLOCAL=/etc/printcap.local
13 PCGEN=/etc/printcap.moira
14 PRINTCAP=/etc/printcap
15
16 # Alert if the tar file or other needed files do not exist
17 test -r $TARFILE || exit $MR_MISSINGFILE
18 test -r $PCLOCAL || exit $MR_MISSINGFILE
19
20 # Unpack the tar file, getting only files that are newer than the
21 # on-disk copies (-u).
22 cd /
23 pax -ru -p o -f $TARFILE
24
25 # Build full printcap
26 cat $PCLOCAL $PCGEN > $PRINTCAP
27
28 # cleanup
29 test -f $TARFILE && rm -f $TARFILE
30 test -f $0 && rm -f $0
31
32 exit 0
33
This page took 0.043439 seconds and 5 git commands to generate.