From 65c587899a11eea413549dd656df07c22e0f7489 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Wed, 13 Nov 2013 17:11:54 +0100 Subject: [PATCH] Added (very) initial MacOSX support --- osync.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/osync.sh b/osync.sh index a8a715f..b7e370d 100755 --- a/osync.sh +++ b/osync.sh @@ -3,7 +3,7 @@ ###### Osync - Rsync based two way sync engine with fault tolerance ###### (L) 2013 by Orsiris "Ozy" de Jong (www.netpower.fr) OSYNC_VERSION=0.99RC2 -OSYNC_BUILD=0411201302 +OSYNC_BUILD=1311201301 DEBUG=no SCRIPT_PID=$$ @@ -259,7 +259,11 @@ function CheckEnvironment function GetOperatingSystem { - LOCAL_OS_VAR=$(uname -spio) + LOCAL_OS_VAR=$(uname -spio > /dev/null 2>&1) + if [ $? != 0 ] + then + LOCAL_OS_VAR=$(uname -v) + fi if [ "$REMOTE_SYNC" == "yes" ] then eval "$SSH_CMD \"uname -spio\" > $RUN_DIR/osync_remote_os_$SCRIPT_PID 2>&1" @@ -284,6 +288,9 @@ function GetOperatingSystem "MINGW32"*) LOCAL_OS="msys" ;; + "Darwin"*) + LOCAL_OS="MacOSX" + ;; *) LogError "Running on >> $LOCAL_OS_VAR << not supported. Please report to the author." exit 1