#!@SH@
# $NetBSD: build-client-start,v 1.3 2015/06/07 22:49:04 joerg Exp $

. @PBULK_CONFIG@

set -e

if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
	echo "Your configuration has version ${config_version}."
	echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
	exit 1
fi

for client in ${build_clients}; do
	case ${client} in 
	*:*)
		port="-p ${client##*:}"
		client=${client%%:*}
		;;
	*)
		;;
	esac
	ssh $port $client "${pbuild} -c ${master_port_build} -b ${pbuild_script}" &
done
