#!/bin/sh
[ `id -un` = "sam" ] || {
	exec sudo -u sam "$0" "$@"
}
if [ -n "$1" ]; then nt "$*"; fi
chotty
cd ~sam
if [ -n "$*" ]; then
	if [ -d "$*" ]; then
		cd "$*"
	elif [ -d "code/$*" ]; then
		cd "code/$*"
	fi
	exec ssh "$*"
else
	nt pi
	while true; do
		v ssh pi
		echo ^C to exit
		read -t 5
	done
fi
