projects
/
matthijs
/
upstream
/
backupninja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move the branches directories up to the root of the repository
[matthijs/upstream/backupninja.git]
/
src
/
backupninja.in
diff --git
a/src/backupninja.in
b/src/backupninja.in
index 2a1b76ebae4c1d512a6a3f800a92a7e9573cc326..afb9556cefcba57a5a68c511eb874ae709afb871 100755
(executable)
--- a/
src/backupninja.in
+++ b/
src/backupninja.in
@@
-98,7
+98,7
@@
function printmsg() {
function logmsg() {
if [ -w "$logfile" ]; then
function logmsg() {
if [ -w "$logfile" ]; then
- echo -e `
LC_ALL=C
date "+%h %d %H:%M:%S"` "$@" >> $logfile
+ echo -e `date "+%h %d %H:%M:%S"` "$@" >> $logfile
fi
}
fi
}
@@
-185,7
+185,7
@@
function tolower() {
# simple to integer function
function toint() {
# simple to integer function
function toint() {
- echo "$1" | tr -d '[:alpha:]'
+ echo "$1" | tr -d '[:alpha:]'
}
#
}
#
@@
-200,17
+200,14
@@
function toint() {
# we grab the current time once, since processing
# all the configs might take more than an hour.
# we grab the current time once, since processing
# all the configs might take more than an hour.
-nowtime=`
LC_ALL=C
date +%H`
-nowday=`
LC_ALL=C
date +%d`
-nowdayofweek=`
LC_ALL=C
date +%A`
+nowtime=`date +%H`
+nowday=`date +%d`
+nowdayofweek=`date +%A`
nowdayofweek=`tolower "$nowdayofweek"`
function isnow() {
local when="$1"
set -- $when
nowdayofweek=`tolower "$nowdayofweek"`
function isnow() {
local when="$1"
set -- $when
-
- [ "$when" == "manual" ] && return 0
-
whendayofweek=$1; at=$2; whentime=$3;
whenday=`toint "$whendayofweek"`
whendayofweek=`tolower "$whendayofweek"`
whendayofweek=$1; at=$2; whentime=$3;
whenday=`toint "$whendayofweek"`
whendayofweek=`tolower "$whendayofweek"`
@@
-301,9
+298,9
@@
function process_action() {
ret=$?
IFS=$'\t\n'
if [ $ret == 0 ]; then
ret=$?
IFS=$'\t\n'
if [ $ret == 0 ]; then
- debug "skipping $file because
current time does not match
$w"
+ debug "skipping $file because
it is not
$w"
else
else
- info ">>>> starting action $file (because
current time matche
s $w)"
+ info ">>>> starting action $file (because
it i
s $w)"
run="yes"
fi
done
run="yes"
fi
done
@@
-564,7
+561,7
@@
if [ $doit == 1 ]; then
previous=""
for i in $(ls "$configdirectory"); do
backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
previous=""
for i in $(ls "$configdirectory"); do
backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
- if [ "$backuploc" != "$previous" -a -n "$backuploc" ]; then
+
if [ "$backuploc" != "$previous" -a -n "$backuploc" ]; then
df -h "$backuploc"
previous="$backuploc"
fi
df -h "$backuploc"
previous="$backuploc"
fi