#!/bin/bash
#                      /usr/local/bin/syncfeed2imap
# http://crystalfaeries.net/posix/bin/syncfeed2imap
# celeste:crystalfaery 2015-09-29 16:58:30+00:00

let	result=0	#	success
echo	"`now`	=======	$0	=======	$1	======="	|| let result=1		# counting forwards from beginning of file

if [ "$1" == "--dry-run" ]
	then
		dryrun="--dry-run"	# only testing
	else
		dryrun=""		# do it for real
fi

# sync with my_twin
cd	$HOME		||	exit	-1
echo   "rsync -auvzH $dryrun ~/.feed2imaprc `my_twin`:~/.feed2imaprc"
rsync -auvzH $dryrun         ~/.feed2imaprc `my_twin`:~/.feed2imaprc
echo   "rsync -auvzH $dryrun		    `my_twin`:~/.feed2imaprc ~/.feed2imaprc" 
rsync -auvzH $dryrun			    `my_twin`:~/.feed2imaprc ~/.feed2imaprc

let	result=$?		# save the result code to return as my result code (pass through unless we override with our own error)
echo	"`now`	-------	$0	-------	$1	-------"	|| let result=255	# counting backwards from end of file
exit	$result


syntax highlighted by Code2HTML, v. 0.9.1