aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2012-05-14 16:30:02 +0200
committerintrigeri <intrigeri@boum.org>2012-05-14 16:30:02 +0200
commit7c66b699f5820a9fab997a98d95e2852dd21a262 (patch)
tree113c3e647287be70832d5005da34567b5bc02715
parentc52239140489236d927506086f972b4f8c5f6fd6 (diff)
downloadbackupninja-7c66b699f5820a9fab997a98d95e2852dd21a262.tar.gz
backupninja-7c66b699f5820a9fab997a98d95e2852dd21a262.tar.bz2
Always use explicit sed's -e.
Hopefully this fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656968#31 and future incarnations of this class of bugs.
-rw-r--r--handlers/rsync.in10
1 files changed, 5 insertions, 5 deletions
diff --git a/handlers/rsync.in b/handlers/rsync.in
index c5c7cac..2d00267 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -275,7 +275,7 @@ function eval_config {
mv=move_files
fi
- excludes=`echo "$exclude" | @SED@ "s/^/--exclude='/g" -e "s/ /' --exclude='/g" -e "s/$/'/"`
+ excludes=`echo "$exclude" | @SED@ -e "s/^/--exclude='/g" -e "s/ /' --exclude='/g" -e "s/$/'/"`
}
@@ -406,7 +406,7 @@ function rotate_long {
fi
# Rotate the current list of backups, if we can.
- oldest=`find $backuproot -maxdepth 1 -type d -name $rottype'.*' | @SED@ 's/^.*\.//' | sort -n | tail -1`
+ oldest=`find $backuproot -maxdepth 1 -type d -name $rottype'.*' | @SED@ -e 's/^.*\.//' | sort -n | tail -1`
[ "$oldest" == "" ] && oldest=0
for (( i=$oldest; i > 0; i-- )); do
if [ -d $dir.$i ]; then
@@ -468,7 +468,7 @@ function rotate_long {
for rottype in daily weekly monthly; do
max=$((keep${rottype}+1))
dir="$backuproot/$rottype"
- oldest=`find $backuproot -maxdepth 1 -type d -name $rottype'.*' | @SED@ 's/^.*\.//' | sort -n | tail -1`
+ oldest=`find $backuproot -maxdepth 1 -type d -name $rottype'.*' | @SED@ -e 's/^.*\.//' | sort -n | tail -1`
[ "$oldest" == "" ] && oldest=0
# if we've rotated the last backup off the stack, remove it.
for (( i=$oldest; i >= $max; i-- )); do
@@ -529,7 +529,7 @@ function rotate_long_remote {
fi
# Rotate the current list of backups, if we can.
- oldest=\`find $backuproot -maxdepth 1 -type d -name \$rottype'.*' | @SED@ 's/^.*\.//' | sort -n | tail -1\`
+ oldest=\`find $backuproot -maxdepth 1 -type d -name \$rottype'.*' | @SED@ -e 's/^.*\.//' | sort -n | tail -1\`
[ "\$oldest" == "" ] && oldest=0
for (( i=\$oldest; i > 0; i-- )); do
if [ -d \$dir.\$i ]; then
@@ -591,7 +591,7 @@ function rotate_long_remote {
for rottype in daily weekly monthly; do
max=\$((keep\${rottype}+1))
dir="$backuproot/\$rottype"
- oldest=\`find $backuproot -maxdepth 1 -type d -name \$rottype'.*' | @SED@ 's/^.*\.//' | sort -n | tail -1\`
+ oldest=\`find $backuproot -maxdepth 1 -type d -name \$rottype'.*' | @SED@ -e 's/^.*\.//' | sort -n | tail -1\`
[ "\$oldest" == "" ] && oldest=0
# if we've rotated the last backup off the stack, remove it.
for (( i=\$oldest; i >= \$max; i-- )); do