#!/bin/sh host=andromeda.cacheboy.net grab_files() { rsync -ab "$@" ${host}::tools/userconfig/standard_dotfiles/ . ## rsync -ab "$@" ${host}::tools/userconfig/standard_scripts bin echo ${host}::tools/userconfig/standard_dotfiles/ > .rsync_base } # check if this is just an update if [ -f .rsync_base ] ; then # if so, show what is being updated grab_files -v else # if not, do sanity checks, preparation and tweaks as well as grabbing files # in a non-verbose fashion mkdir -p tmp/old || exit 3 [ -x /usr/bin/rsync -o -x /usr/local/bin/rsync ] || exit 4 # prepare by moving files to tmp/old that would be overwritten mv -v `rsync ${host}::tools/userconfig/standard_dotfiles/ | awk '$5 != "." { print $5 }'` tmp/old if [ -f .bash_profile ] ; then mv -v .bash_profile tmp/old ; fi grab_files # do any tweaks needed mkdir -p bin if [ ! -f .mail_aliases ] ; then touch .mail_aliases ; fi fi