Change pull script to only do subdirectories in music.

This commit is contained in:
2026-03-30 10:43:03 -07:00
parent 3399b07031
commit 588007fe37

View File

@@ -18,6 +18,12 @@ if [[ "$DIR" != *"-clone" ]]; then
exit 0
fi
# Only pull the existing subdirectories rather than ALL content.
subdirs_only="false"
if [[ "$dir" == "music-clone" ]]; then
subdirs_only="true"
fi
## Main ##
echo "`date` - Pulling" \
@@ -30,11 +36,23 @@ while true; do
echo "Sleeping for '$sleep' seconds..."
sleep $sleep
fi
if [[ "$subdirs_only" == "true" ]]; then
ls $DIR | while read subdir; do
clone -e "ssh -p $PROD_DATA_PORT" \
$PROD_DATA_USER@$PROD_DATA_HOST:$PROD_DATA_DIR/$dir/$subdir/ \
./$subdir &&
echo "`date` - Success!" ||
echo "`date` - Failed!"
done
else
clone -e "ssh -p $PROD_DATA_PORT" \
$PROD_DATA_USER@$PROD_DATA_HOST:$PROD_DATA_DIR/$dir/ \
. &&
echo "`date` - Success!" ||
echo "`date` - Failed!"
fi
sleep=30
if [[ "$loop" == false ]]; then
break;