summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsavelocaltweaks5
1 files changed, 4 insertions, 1 deletions
diff --git a/savelocaltweaks b/savelocaltweaks
index 9262bf0..96e9e0b 100755
--- a/savelocaltweaks
+++ b/savelocaltweaks
@@ -35,6 +35,9 @@ fi
# process all files once each
for file in `for x in $files; do echo $x; done | uniq | sort`; do
+ # file were chosen based on backups - it may not exist itelf
+ [ -s "$basedir/$file" ] || continue
+
for exclude in $excludes; do
[ "$file" = "$exclude" ] && continue 2
done
@@ -52,7 +55,7 @@ for file in `for x in $files; do echo $x; done | uniq | sort`; do
cp -af $basedir/$file $newdir
# Only diff against existing and non-empty files.
- if [ -n "$ext" ] && [ -s $basedir/$file ] && [ -s $basedir/$file$ext ]; then
+ if [ -n "$ext" ] && [ -s $basedir/$file$ext ]; then
diff -ruN $basedir/$file$ext $basedir/$file > $targetdir/$basedir/$file.diff
chown --reference=$basedir/$file $targetdir/$basedir/$file.diff
chmod --reference=$basedir/$file $targetdir/$basedir/$file.diff