]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
change: backup code style lines
authorBastian Dehn <hhaalo@arcor.de>
Sat, 22 Sep 2018 13:03:29 +0000 (15:03 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 22 Sep 2018 13:03:29 +0000 (15:03 +0200)
backup

diff --git a/backup b/backup
index d319bf839369e12674db44d22214d783685be6ac..cd3b9e281f467b30e600b6107be8ec014ea8dd06 100755 (executable)
--- a/backup
+++ b/backup
@@ -51,10 +51,8 @@ CreateBackupFolder()
                backDir="$(date +%Y-%m-%d)"_"$fullnum"_"$backname"
        done
 
-       tmpordner=$(find $backpath -maxdepth 1 -type d \
-               -name "*_"$backname"" \
-               | sort \
-               | tail --lines=1)
+       tmpordner=$(find $backpath -maxdepth 1 -type d -name "*_"$backname"" \
+               | sort | tail --lines=1)
        lastBackDir=${tmpordner##*/}
 }
 
@@ -152,8 +150,7 @@ BackupOnlineVMs()
 
 BackupOfflineVMs()
 {
-       offlineVM=$(ssh $remoteLogin virsh list --all \
-               | grep 'shut off' \
+       offlineVM=$(ssh $remoteLogin virsh list --all | grep 'shut off' \
                | awk '{print $2}')
 
        for VM in $offlineVM; do
@@ -245,9 +242,7 @@ LoescheVerzeichnisse()
 
 CleanUpBackups()
 {
-       backupanzahl=$(ls --directory $backpath/*/ \
-               | grep "_$backname" \
-               | sort \
+       backupanzahl=$(ls --directory $backpath/*/ | grep "_$backname" | sort \
                | wc --lines)
        loeschanzahl=$(($backupanzahl - $wunschanzahl))