Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7130cccc5 |
8
Makefile
8
Makefile
@@ -15,7 +15,7 @@ URL = http://ftp.isc.org/isc/cron/
|
||||
REPO = main
|
||||
BRIEF = daemon to execute scheduled commands
|
||||
DESC = An implimentation of cron based on the SysV cron (aka Vixie cron)
|
||||
SNAPVER = 0
|
||||
SNAPVER = 1
|
||||
|
||||
ARCHIVE := $(PWD)/$(shell ls SRC/*.shar|tail -1)
|
||||
SRCDIR := cron-$(shell echo $(ARCHIVE)|egrep -o '[0-9]\.[0-9]')
|
||||
@@ -63,8 +63,10 @@ $(ROOT): $(SRCDIR)/cron
|
||||
install -v -m 644 crontab.1 $(ROOT)/usr/share/man/man1/crontab.1 && \
|
||||
install -v -m 644 crontab.5 $(ROOT)/usr/share/man/man5/crontab.5 && \
|
||||
install -v -m 644 cron.8 $(ROOT)/usr/share/man/man8/cron.8 && \
|
||||
install -v -m 755 $(SNAPDIR)/cron.init $(ROOT)/etc/init.d/cron
|
||||
install -v -m 600 $(SNAPDIR)/crontab $(ROOT)/usr/share/cron/crontab
|
||||
install -v -m 755 $(SNAPDIR)/cron.init $(ROOT)/etc/init.d/cron && \
|
||||
install -v -m 600 $(SNAPDIR)/crontab \
|
||||
$(ROOT)/usr/share/cron/crontab && \
|
||||
install -v -m 755 $(SNAPDIR)/runall $(ROOT)/bin
|
||||
|
||||
test: $(ROOT)
|
||||
@cd $(SRCDIR); \
|
||||
|
||||
39
SNAP/runall
Executable file
39
SNAP/runall
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage () {
|
||||
echo "Usage: ${0#*/} [DIRECTORY]..."
|
||||
echo "Run all executable scripts in one or more directories"
|
||||
|
||||
exit $1
|
||||
}
|
||||
|
||||
ERRORS=
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
usage 2
|
||||
fi
|
||||
|
||||
for dir in "$@"; do
|
||||
dir=${dir%/}
|
||||
if [ ! -d "$dir" ]; then
|
||||
echo "$dir: invalid directory"
|
||||
|
||||
usage 2
|
||||
fi
|
||||
|
||||
for file in "$dir"/*; do
|
||||
if [ -x "$file" ]; then
|
||||
"$file"
|
||||
|
||||
if [ "$?" -gt 0 ]; then
|
||||
ERRORS="$ERRORS $file"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
if [ -n "$ERRORS" ]; then
|
||||
echo "There were errors in the following scripts:$ERRORS"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user