projects
/
matthijs
/
upstream
/
backupninja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b29b969
)
added --run
author
Elijah Saxon
<elijah@riseup.net>
Sat, 26 Feb 2005 21:26:09 +0000
(21:26 +0000)
committer
Elijah Saxon
<elijah@riseup.net>
Sat, 26 Feb 2005 21:26:09 +0000
(21:26 +0000)
backupninja
patch
|
blob
|
history
diff --git
a/backupninja
b/backupninja
index fb5437824c0f772fad63f9f570b8dd8cdb32e120..81b1a17896412ef8eb5e8943291885b5e9ba0907 100755
(executable)
--- a/
backupninja
+++ b/
backupninja
@@
-352,6
+352,17
@@
while [ $# -ge 1 ]; do
# we shift here to avoid processing the file path
shift
;;
# we shift here to avoid processing the file path
shift
;;
+ --run)
+ if [ -f $2 ]; then
+ singlerun=$2
+ processnow=1
+ debug=1
+ else
+ fatal "--run option must be fallowed by a backupninja action file"
+ usage
+ fi
+ shift
+ ;;
*)
fatal "Unknown option $1"
usage
*)
fatal "Unknown option $1"
usage
@@
-406,7
+417,13
@@
warnings=0
actions_run=0
errormsg=""
actions_run=0
errormsg=""
-for file in $configdirectory/*; do
+if [ "$singlerun" ]; then
+ files=$singlerun
+else
+ files=`ls $configdirectory`
+fi
+
+for file in $files; do
[ -f $file ] || continue;
check_perms $file
[ -f $file ] || continue;
check_perms $file
@@
-424,7
+441,7
@@
for file in $configdirectory/*; do
msg "*missing handler* -- $file"
fi
done
msg "*missing handler* -- $file"
fi
done
-
+
## mail the messages to the report address
if [ $actions_run == 0 ]; then doit=0
## mail the messages to the report address
if [ $actions_run == 0 ]; then doit=0