From eb0549a5111ad8b54a0a24cf3cab8dcad6d13d1c Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 26 May 2020 23:03:55 +0000 Subject: [PATCH] portability for lunix --- homedir.makefile/Makefile | 4 ++-- osxbackup/rsyncbackup.command | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/homedir.makefile/Makefile b/homedir.makefile/Makefile index e02edb2..7189ff0 100644 --- a/homedir.makefile/Makefile +++ b/homedir.makefile/Makefile @@ -40,8 +40,8 @@ mailoffsite: imapbackup databackup: mkdir -p $(HOME)/Library/misc - brew list > $(HOME)/Library/misc/brewinstalled.txt - brew cask list > $(HOME)/Library/misc/brew-cask-installed.txt + #brew list > $(HOME)/Library/misc/brewinstalled.txt + #brew cask list > $(HOME)/Library/misc/brew-cask-installed.txt ~/dev/hacks/bin/backup.command cleanup: diff --git a/osxbackup/rsyncbackup.command b/osxbackup/rsyncbackup.command index d528721..5f1a82f 100755 --- a/osxbackup/rsyncbackup.command +++ b/osxbackup/rsyncbackup.command @@ -63,6 +63,7 @@ RE+=" --exclude=/Library/Containers/com.docker.docker/" RE+=" --exclude=/Library/Cookies/" RE+=" --exclude=/Library/Developer/" RE+=" --exclude=/Library/Homebrew/" +RE+=" --exclude=/Library/Syncthing/folders/" # syncthing is its own backup RE+=" --exclude=/Library/Logs/" RE+=" --exclude=/Library/Mail/" # keep your mail on the server! RE+=" --exclude=/Library/Mail?Downloads/" @@ -174,9 +175,11 @@ RE+=" --exclude=/iBooks.app" RE+=" --exclude=/iMovie.app" RE+=" --exclude=/iTunes.app" -RETVAL=255 -while [ $RETVAL -ne 0 ]; do - $RSYNC $OPTS $RE $MINRE /Applications/ ${BACKUPDEST}/Applications/ - RETVAL=$? - sleep 1; -done +if [[ "$(uname)" = "Darwin" ]]; then + RETVAL=255 + while [ $RETVAL -ne 0 ]; do + $RSYNC $OPTS $RE $MINRE /Applications/ ${BACKUPDEST}/Applications/ + RETVAL=$? + sleep 1; + done +fi