You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

copy-from-target 813B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/sh
  2. . gconfig
  3. TUSER=ubuntu
  4. QUIET_FLAG=
  5. usage() {
  6. echo "Usage: ${0##*/} [OPTION]... <command>"
  7. echo "Run command on build target."
  8. echo
  9. cat << EOF
  10. --help display this help and exit
  11. --user=U run as U instead of ubuntu
  12. EOF
  13. }
  14. if [ $# != 0 ] ; then
  15. while true ; do
  16. case "$1" in
  17. --help|-h)
  18. usage
  19. exit 0
  20. ;;
  21. --user|-u)
  22. TUSER="$2"
  23. shift 2
  24. ;;
  25. --quiet|-q)
  26. QUIET_FLAG="-q"
  27. shift 1
  28. ;;
  29. --*)
  30. echo "unrecognized option $1"
  31. exit 1
  32. ;;
  33. *)
  34. break
  35. ;;
  36. esac
  37. done
  38. fi
  39. if [ $# = 0 ] ; then
  40. usage
  41. exit 1
  42. fi
  43. scp $QUIET_FLAG -oConnectTimeout=5 -oNoHostAuthenticationForLocalhost=yes -i ${GITIAN_BASE:-.}/var/id_dsa -P $VM_SSH_PORT -r $TUSER@localhost:$1 $2