# $Header: /magellan-cvs/smage/include/rsync.sminc,v 1.1 2005/12/04 12:26:54 niro Exp $ # rsync fetch functions # at least only RSYNC_URI must be exported # export RSYNC_URI="rsync://192.168.0.2/${PNAME}-${PVER}-${PBUILD}" rsync_fetch_source() { [[ -z ${RSYNC_URI} ]] && die "no RSYNC_URI given, cannot run a checkout." install -d ${SRCDIR} || die rsync \ --recursive \ --links \ --perms \ --times \ --devices \ --timeout=600 \ --verbose \ --compress \ --progress \ --stats \ --delete \ --delete-after \ ${RSYNC_URI} \ ${SRCDIR} || die cd ${SRCDIR} # clean up backup files (foo~) find ${SRCDIR} -name *~ -exec rm '{}' ';' || die } rsync_src_prepare() { rsync_fetch_source || die } export_inherits rsync src_prepare