generated from me/template-mit
Process folders named as SYNC as both a MASTER and CLONE.
This commit is contained in:
@@ -13,8 +13,8 @@ dir="`basename $DIR`"
|
|||||||
|
|
||||||
## Validations ##
|
## Validations ##
|
||||||
|
|
||||||
if [[ "$DIR" != *"-clone" ]]; then
|
if [[ "$DIR" != *"-clone" || "$DIR" != *"-SYNC" ]]; then
|
||||||
echo "'$DIR' is not labeled as a clone. Skipping download."
|
echo "'$DIR' is not labeled as a CLONE or SYNC. Skipping download."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ dir="`basename $DIR`"
|
|||||||
|
|
||||||
## Validations ##
|
## Validations ##
|
||||||
|
|
||||||
if [[ "$DIR" != *"-MASTER" ]]; then
|
if [[ "$DIR" != *"-MASTER" || "$DIR" != *"-SYNC" ]]; then
|
||||||
echo "'$DIR' is not labeled as a MASTER. Skipping upload."
|
echo "'$DIR' is not labeled as a MASTER or SYNC. Skipping upload."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
12
rc_shared.sh
12
rc_shared.sh
@@ -85,25 +85,25 @@ function today { date "+%Y%m%d"; }
|
|||||||
# Enhance Bin Scripts #
|
# Enhance Bin Scripts #
|
||||||
|
|
||||||
function send-masters {
|
function send-masters {
|
||||||
echo -e "`date` - Looping through MASTER directories."
|
echo -e "`date` - Looping through MASTER & SYNC directories."
|
||||||
ls | grep '\-MASTER' | while read dir; do
|
ls | grep '\-MASTER\|\-SYNC' | while read dir; do
|
||||||
echo -e "\n`date` - Found '$dir'..."
|
echo -e "\n`date` - Found '$dir'..."
|
||||||
cd $dir
|
cd $dir
|
||||||
send-master
|
send-master
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
echo -e "\n`date` - Done checking for MASTER directories."
|
echo -e "\n`date` - Done checking for MASTER & SYNC directories."
|
||||||
}
|
}
|
||||||
|
|
||||||
function pull-clones {
|
function pull-clones {
|
||||||
echo -e "`date` - Looping through clone directories."
|
echo -e "`date` - Looping through clone & SYNC directories."
|
||||||
ls | grep '\-clone' | while read dir; do
|
ls | grep "\-clone\|\-SYNC" | while read dir; do
|
||||||
echo -e "\n`date` - Found '$dir'..."
|
echo -e "\n`date` - Found '$dir'..."
|
||||||
cd $dir
|
cd $dir
|
||||||
pull-clone
|
pull-clone
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
echo -e "\n`date` - Done checking for clone directories."
|
echo -e "\n`date` - Done checking for clone & SYNC directories."
|
||||||
}
|
}
|
||||||
|
|
||||||
# Audio #
|
# Audio #
|
||||||
|
|||||||
Reference in New Issue
Block a user