warbo-utilities: 4567d14eb9d803015dcd6825ec0919bb846fc1fa

     1: #!/usr/bin/env bash
     2: 
     3: # Useful rsync options for copying to remote servers. Some explanation:
     4: #   --ignore-times because Nix sets them all to 1970
     5: #   --checksum uses file content to determine what's changed, in lieu of the
     6: #     timestamp
     7: #   --delete removes any files on the destination which aren't in the source
     8: #   --progress tells us what it's up to
     9: #   --copy-unsafe-links causes absolute symlinks (or relative ones pointing
    10: #     outside the source tree) to be dereferenced and copied as files/dirs
    11: #   --archive causes directories and (safe) symlinks to be copied, and
    12: #     permissions, etc. to be preserved
    13: #   -e forces SSH to use a TTY, so sudo will work
    14: #   --rsync-path tells us what to run on the remote end, in this case we use
    15: #     sudo so we've got permission to write to /var/www. NOTE: If you use an
    16: #     SSH passphrase, this might cause it to be sent in the clear! We use
    17: #     keys so it's not an issue.
    18: rsync --checksum --delete --ignore-times --progress --copy-unsafe-links \
    19:       --archive --compress -e "ssh -t" --rsync-path="sudo rsync" "$@"

Generated by git2html.