From c859b4dcd8b0b8c3de9b4d636826b1f3d1fea211 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 31 Mar 2026 17:54:22 -0700 Subject: [PATCH] Process folders named as SYNC as both a MASTER and CLONE. --- bin-shared/pull_clone.sh | 4 ++-- bin-shared/send_master.sh | 4 ++-- rc_shared.sh | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin-shared/pull_clone.sh b/bin-shared/pull_clone.sh index db02cb7..75e77e8 100755 --- a/bin-shared/pull_clone.sh +++ b/bin-shared/pull_clone.sh @@ -13,8 +13,8 @@ dir="`basename $DIR`" ## Validations ## -if [[ "$DIR" != *"-clone" ]]; then - echo "'$DIR' is not labeled as a clone. Skipping download." +if [[ "$DIR" != *"-clone" || "$DIR" != *"-SYNC" ]]; then + echo "'$DIR' is not labeled as a CLONE or SYNC. Skipping download." exit 0 fi diff --git a/bin-shared/send_master.sh b/bin-shared/send_master.sh index 4fbc53a..3d4e1a8 100755 --- a/bin-shared/send_master.sh +++ b/bin-shared/send_master.sh @@ -14,8 +14,8 @@ dir="`basename $DIR`" ## Validations ## -if [[ "$DIR" != *"-MASTER" ]]; then - echo "'$DIR' is not labeled as a MASTER. Skipping upload." +if [[ "$DIR" != *"-MASTER" || "$DIR" != *"-SYNC" ]]; then + echo "'$DIR' is not labeled as a MASTER or SYNC. Skipping upload." exit 0 fi diff --git a/rc_shared.sh b/rc_shared.sh index f65be72..44e22d9 100644 --- a/rc_shared.sh +++ b/rc_shared.sh @@ -85,25 +85,25 @@ function today { date "+%Y%m%d"; } # Enhance Bin Scripts # function send-masters { - echo -e "`date` - Looping through MASTER directories." - ls | grep '\-MASTER' | while read dir; do + echo -e "`date` - Looping through MASTER & SYNC directories." + ls | grep '\-MASTER\|\-SYNC' | while read dir; do echo -e "\n`date` - Found '$dir'..." cd $dir send-master cd .. done - echo -e "\n`date` - Done checking for MASTER directories." + echo -e "\n`date` - Done checking for MASTER & SYNC directories." } function pull-clones { - echo -e "`date` - Looping through clone directories." - ls | grep '\-clone' | while read dir; do + echo -e "`date` - Looping through clone & SYNC directories." + ls | grep "\-clone\|\-SYNC" | while read dir; do echo -e "\n`date` - Found '$dir'..." cd $dir pull-clone cd .. done - echo -e "\n`date` - Done checking for clone directories." + echo -e "\n`date` - Done checking for clone & SYNC directories." } # Audio #