Created
June 28, 2018 05:19
-
-
Save abigoroth/d48db712b194c69046e00df6f048401a to your computer and use it in GitHub Desktop.
hook rsync completion.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SYNC_FILE () { | |
#check for rsync binary | |
if [[ -z $(whereis -qb rsync) ]]; then | |
echo "fatal error: rsync not found." | |
exit 1 | |
fi | |
echo "Begin rsync.." | |
#run rsync to sync with remote server. | |
rsync -azP --prune-empty-dirs --include="*/" --include="*.slave" --exclude="*" $LOCAL_PATH system@$SERVER:$REMOTE_PATH | |
echo "Sync done." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment