Last active
October 23, 2020 20:43
-
-
Save Digital-Grinnell/69c3cca524071098bbf5c865ec632164 to your computer and use it in GitHub Desktop.
Script for pull updates from DG-FEDORA-Master
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
#!/bin/bash | |
# pull-from-master.sh | |
# This script is maintained as a public gist to simplify sharing. | |
# It can be found at https://gist.github.com/Digital-Grinnell/69c3cca524071098bbf5c865ec632164. | |
# check that //STORAGE/LIBRARY/mcfatem/DG-FEDORA-Master is mounted | |
[ ! -d "/Volumes/mcfatem/DG-FEDORA-Master" ] && echo "Error: You must mount 'smb://Storage/Library/mcfatem' in Finder BEFORE you begin!" && exit ${ERRCODE} | |
# current date and time to be used in filename | |
CDT=`date +%d-%b-%Y-%H-%M` | |
#echo ${CDT} | |
# source of this pull-from-master | |
SRC="DG-FEDORA-Master" | |
#echo ${SRC} | |
# log file name | |
LOG=pull-from_DG-FEDORA-Master_${CDT}.log | |
echo ".log file is: ${LOG}" | |
echo "Starting rsync now..." | |
rsync -azrui \ | |
--exclude ".DS_Store" \ | |
--exclude ".SpotlightV-100" \ | |
--exclude ".Trashes" \ | |
--exclude ".TemporaryItems" \ | |
/Volumes/mcfatem/DG-FEDORA-Master/. /Volumes/DG-FEDORA/. \ | |
--progress \ | |
--log-file=${LOG} | |
echo "rsync is complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment