]> git.sesse.net Git - backup.sh/blobdiff - backup.sh
More if/then consistency fixes.
[backup.sh] / backup.sh
index fe208a28ccbe8a1d3142ec5fc96a36f215d7d91d..b17ad65dffec7564860599e1f3c4e93614f85211 100755 (executable)
--- a/backup.sh
+++ b/backup.sh
@@ -77,8 +77,7 @@ backup()
 
        SNARFILE="${storagedir}/${computer}/${sfilesystem}/.incremental.snar"
        incrementalsnar="/root/.backup/${sfilesystem}.snar"
-       if [ "$backuplevel" = "daglig" ]
-       then
+       if [ "$backuplevel" = "daglig" ]; then
                # If incremental backup, we need to copy the incremental status to $computer.
                # If it does not exist, whine a bit and then run date-based instead.
                if [ -s "$SNARFILE" ]; then
@@ -217,11 +216,9 @@ for filesystem in $filesystems; do
        # Default backuplevel
        backuplevel=daglig
 
-       if [ ! -s $storagedir/$computer/$sfilesystem/.date ]
-       then
+       if [ ! -s $storagedir/$computer/$sfilesystem/.date ]; then
                # Take the first full backup of this filesystem on this computer
                backuplevel=full
-               echo $DATEs > $storagedir/$computer/$sfilesystem/.date
        fi
 
        # Check if we want a full backup