Skip to content

Instantly share code, notes, and snippets.

@Digital-Grinnell
Last active October 23, 2020 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Digital-Grinnell/69c3cca524071098bbf5c865ec632164 to your computer and use it in GitHub Desktop.
Save Digital-Grinnell/69c3cca524071098bbf5c865ec632164 to your computer and use it in GitHub Desktop.
Script for pull updates from DG-FEDORA-Master
#!/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