Template catsit script with RUNDIR

This commit is contained in:
C. McEnroe 2020-08-17 23:25:34 -04:00
parent 2a7467647e
commit 08783bd1cc
2 changed files with 5 additions and 5 deletions

View File

@ -32,13 +32,13 @@ catsitd: ${OBJS}
${OBJS}: daemon.h ${OBJS}: daemon.h
tags: *.c *.h
ctags -w *.c *.h
.SUFFIXES: .in .SUFFIXES: .in
.in: .in:
sed -e 's|%%PREFIX%%|${PREFIX}|g' $< > $@ sed -e 's|%%PREFIX%%|${PREFIX}|g' -e 's|%%RUNDIR%%|${RUNDIR}|g' $< > $@
tags: *.c *.h
ctags -w *.c *.h
clean: clean:
rm -f ${BINS} ${OBJS} ${RC_SCRIPT} tags rm -f ${BINS} ${OBJS} ${RC_SCRIPT} tags

View File

@ -6,7 +6,7 @@ die() {
exit 1 exit 1
} }
: ${CATSITD_PIPE:=/var/run/catsitd.pipe} : ${CATSITD_PIPE:='%%RUNDIR%%/catsitd.pipe'}
while getopts 'c:' opt; do while getopts 'c:' opt; do
case "${opt}" in case "${opt}" in