#!/sbin/sh
set -e

if [ $# -lt 1 ]
then
	echo "pscp Ver.1.2";
	exit;
fi

cmddir=`dirname $0`
tmpfile=`echo /tmp/pscp.$@ | sed 's/ //g' `


if [ -f $1 ]
then
	$cmddir/pp $1 > $tmpfile
elif [ -f $1.map ]
then
	$cmddir/pp $1.map > $tmpfile
fi

shift
$cmddir/scp $tmpfile $@
