Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # SheBang defaults to environment's bash
- # Set bash debug
- if [[ "$@" == *"--debug"* ]] || [ ${BASH_DEBUG} ]; then
- export BASH_DEBUG=true
- set -ex
- fi
- # Reference Path of this script
- SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
- # Reference path where you will run script paths from
- SCRIPT_ROOT="$($(cd ${SCRIPT_PATH}/..) && pwd)"
- cd "${SCRIPT_ROOT}"
- # Sync hidden dotfiles also
- shopt -s dotglob
- rsync \
- --verbose \
- --checksum \
- --archive \
- --delete \
- --stats \
- --human-readable \
- --progress \
- --itemize-changes \
- --include ".*" \
- "${SCRIPT_ROOT}" \
- "$1" \
- ;
Add Comment
Please, Sign In to add comment