From 3126ee947c7ae6266878741ae8c29357bfdb868c Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Thu, 19 Jul 2018 22:40:49 -0400 Subject: [PATCH 1/2] Add msys(2) date parsing from bash prompt. --- rsync_tmbackup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh index a8723e7..1c1be83 100755 --- a/rsync_tmbackup.sh +++ b/rsync_tmbackup.sh @@ -59,6 +59,7 @@ fn_parse_date() { case "$OSTYPE" in linux*) date -d "${1:0:10} ${1:11:2}:${1:13:2}:${1:15:2}" +%s ;; cygwin*) date -d "${1:0:10} ${1:11:2}:${1:13:2}:${1:15:2}" +%s ;; + msys*) date -d "${1:0:10} ${1:11:2}:${1:13:2}:${1:15:2}" +%s ;; netbsd*) date -d "${1:0:10} ${1:11:2}:${1:13:2}:${1:15:2}" +%s ;; darwin8*) yy=`expr ${1:0:4}` mm=`expr ${1:5:2} - 1` From c826aa0f6c195c4540c436e2e8705c1f9d8fac60 Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Thu, 19 Jul 2018 23:14:23 -0400 Subject: [PATCH 2/2] Use procps package on msys(2) to determine whether a backup is currently running. --- rsync_tmbackup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh index 1c1be83..6f67246 100755 --- a/rsync_tmbackup.sh +++ b/rsync_tmbackup.sh @@ -356,7 +356,7 @@ fi # ----------------------------------------------------------------------------- if [ -n "$(fn_find "$INPROGRESS_FILE")" ]; then - if [ "$OSTYPE" == "cygwin" ]; then + if [ "$OSTYPE" == "cygwin" -o "$OSTYPE" == "msys" ]; then # 1. Grab the PID of previous run from the PID file RUNNINGPID="$(fn_run_cmd "cat $INPROGRESS_FILE")"