#!/bin/bash
#                       /usr/local/bin/syncdotfiles
#  http://crystalfaeries.net/posix/bin/syncdotfiles
# celeste:crystalfaery 2016-03-08 11:30:53+00:00
# synchronize home directory .files with TAILS

# Starting Up:
echo	"`/usr/local/bin/now`	=======	$0	=======	$1	=======" && exitval=0 || exitval=$?

# Update Me from My TAILS	(ignore errors in case Corsair Survivor is not mounted):
rsync -auvzH $1			/media/`/usr/bin/whoami`/TailsData/dotfiles/.??*	\
									  ~/.tails	2>/dev/null
# Update Me from My Twin:
rsync -auvzH $1			$(/usr/local/bin/my_twin):~/.tails	~		|| exitval=$?

# Update My Twin:
rsync -auvzH $1	~/.tails	$(/usr/local/bin/my_twin):~				|| exitval=$?

# Update My TAILS		(ignore errors in case Corsair Survivor is not mounted):
rsync -auvzH $1								  ~/.tails/.??*	\
				/media/`/usr/bin/whoami`/TailsData/dotfiles/		2>/dev/null

# Pau for Now.
echo	"`/usr/local/bin/now`	-------	$0	-------	$1	-------"		|| exitval=$?
exit	$exitval



syntax highlighted by Code2HTML, v. 0.9.1