You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitian-builder/libexec/copy-to-target

45 lines
717 B
Plaintext

14 years ago
#!/bin/sh
. gconfig
TUSER=ubuntu
usage() {
echo "Usage: ${0##*/} [OPTION]... <command>"
echo "Run command on build target."
echo
cat << EOF
--help display this help and exit
--user=U run as U instead of ubuntu
EOF
}
if [ $# != 0 ] ; then
while true ; do
case "$1" in
--help|-h)
usage
exit 0
;;
--user|-u)
TUSER="$2"
shift 2
;;
--*)
echo "unrecognized option $1"
exit 1
;;
*)
break
;;
esac
done
fi
if [ $# = 0 ] ; then
usage
exit 1
fi
scp -oConnectTimeout=5 -oNoHostAuthenticationForLocalhost=yes -i ${GITIAN_BASE:-.}/var/id_dsa -P $VM_SSH_PORT $1 $TUSER@localhost:$2