#! /bin/sh -f
#
# $Id: gfarm-pcp 11291 2019-09-04 06:52:55Z tatebe $

program=gfarm-pcp
MIN_ARGS=2

usage() {
	echo "usage: $program [ -h hostfile ] [ -rcp rcp_command ] [ -a ] [ -v ] [ -n ]"
	echo "           filename1 filename2"
	echo "       $program [ -h hostfile ] [ -rcp rcp_command ] [ -a ] [ -v ] [ -n ]"
	echo "           filename ... directory"
	echo ""
	echo "options:"
	echo "        -a  execute on all nodes listed in the hostfile including myself."
	echo "        -h hostfile"
	echo "            specifies a hostfile.  '-' for the standard input"
	echo "            ($PRUN_DEFAULT_HOSTFILE)"
	echo "        -m max_jobs"
	echo "            specifies the maximum number of parallel jobs. ($PRUN_DEFAULT_MAX_JOBS)"
	echo "        -n  print the commands that would be executed, but do not execute them."
	echo "        -p  execute in the background in parallel."
	echo "        -rcp rcp_command"
	echo "            specifies a remote copy command. ($PRUN_DEFAULT_RCP)"
	echo "        -v  print hostname before copying."
	exit 1
}

. gfarm-ptool

exit 0
