service: nonfatally ignore unknown call keywords
[minix.git] / distrib / sets / metalog.subr
blob525b240628132eb0010214ac0dcbd1fb9a59d0c4
1 # $NetBSD: metalog.subr,v 1.2 2011/02/17 08:41:35 uebayasi Exp $
4 # xrcs add
5 # xrcs update
6 # xrcs remove
8 #       RCS wrapper for non-interactive scripts.
9 #       Excerpted from /etc/security.
12 xrcs_descr=
13 xrcs_msg=
14 xrcs_cur=
15 xrcs_new=
17 xrcs_latest()
19         rcslog -rlatest ${xrcs_cur} | \
20         sed -n '/^revision/ { s/^revision //; p; }'
23 xrcs_retag()
25         previous=$( xrcs_latest 2>/dev/null )
26         if [ -n "$previous" ]; then
27                 rcs -q -Nprevious: ${xrcs_cur}
28         fi
31 xrcs_unlock()
33         rcs -q -u -U -M ${xrcs_cur}
36 xrcs_ci()
38         xrcs_retag
39         ci -q -f -u -t-"$xrcs_descr" -m"$xrcs_msg" -Nlatest ${xrcs_cur}
40         rcs -q -kb -U ${xrcs_cur}
43 xrcs_co()
45         co -q -f -u ${xrcs_cur}
48 xrcs_init()
50         if [ -f ${xrcs_cur},v ]; then
51                 xrcs_unlock
52         fi
54         if [ -f ${xrcs_cur} ]; then
55                 if [ ! -f ${xrcs_cur},v ]; then
56                         xrcs_ci
57                         xrcs_co
58                 fi
59         fi
62 xrcs_add()
64         xrcs_init
65         cp -p $1 ${xrcs_cur}
66         xrcs_ci
67         xrcs_co
70 xrcs_update()
72         xrcs_init
73         xrcs_ci
74         xrcs_co
77 xrcs_remove()
79         xrcs_init
80         cp /dev/null ${xrcs_cur}
81         xrcs_ci
82         rm ${xrcs_cur}
85 xrcs()
87         eval xrcs_$1