24 lines
506 B
Bash
24 lines
506 B
Bash
#!/bin/bash
|
|
# Usage: sequencelogic-pull-slsync-from-master.sh [--destructive]
|
|
|
|
if [ -e "/sllocal/config/noSLSync" ]; then
|
|
echo "Sync disabled on this machine"
|
|
exit 1
|
|
fi
|
|
|
|
DESTRUCT=""
|
|
if [ "$1" = "--destructive" ]; then
|
|
DESTRUCT="--delete"
|
|
shift
|
|
fi
|
|
|
|
if [ -e "/sl/SLSync" ]; then
|
|
cd /sl/SLSync
|
|
echo "Sync from alex..."
|
|
#rsync -av --delete -r alex::SLSync /slmount/SLSync
|
|
rsync -av --progress ${DESTRUCT} alex::SLSync /sl/SLSync
|
|
echo "Sync complete"
|
|
exit 0
|
|
fi
|
|
exit 2
|