I slightly updated the script, so that it would not sync .git
directories. Usually, it is better to git push
than to simply clone the .git
files.
#!/bin/bash
if [[ -z $* ]];then rsync -av --exclude ".git" ./ `./.sshdir`;else rsync $* `./.sshdir`;fi
It would be more general to have an .rsyncignore
file containing the patterns to ignore, but that will hair up the script a bit to check for the existence of that file. I'll do it should I need it. Or maybe I'll make a github directory containing the shell scripts I've written over the years.