File: dh_installcron

package info (click to toggle)
debhelper 0.79hamm1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 332 kB
  • ctags: 6
  • sloc: sh: 578; makefile: 156; perl: 111
file content (20 lines) | stat: -rwxr-xr-x 447 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh -e
#
# Install cron scripts into the appropriate places.

PATH=debian:$PATH:/usr/lib/debhelper
. dh_lib

for PACKAGE in $DH_DOPACKAGES; do
	TMP=`tmpdir $PACKAGE`

	for type in daily weekly monthly; do
		cron=`pkgfile $PACKAGE cron.$type`
		if [ "$cron" ]; then
			if [ ! -d $TMP/etc/cron.$type ]; then
				doit "install -o root -g root -d $TMP/etc/cron.$type"
			fi
			doit "install "$cron" $TMP/etc/cron.$type/$PACKAGE"
		fi
	done
done