Files
fail/scripts/distribute-experiment.sh
hsc 4a4b3ea7e2 FailBochs build process reversed
The FailBochs client is not linked by the Bochs build system anymore, but
by our cmake scripts (make fail-client):
 -  All Bochs libraries are merged into libfailbochs.a (a new target
    within the Bochs Autotools scripts).
 -  The previous libfail.a is *not* a merge of all Fail* libraries anymore,
    but pulls these in via library dependencies.

Additionally I did a lot of build system cleanup, e.g. additional external
libraries may now be pulled in where they're needed.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1390 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-06-29 22:22:41 +00:00

47 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
#
# distribute-experiment.sh [path/to/experiment-target]
# Distribute necessary FailBochs ingredients for experiment target to
# FAIL_DISTRIBUTE_HOSTS. Defaults to an experiment target in the current
# directory.
#
# Prerequisites:
# - (possibly overridden) env variables from fail-env.sh
#
set -e
# determine absolute path of this script
SCRIPTDIR=$(readlink -f $(dirname $0))
# env variable defaults
source $SCRIPTDIR/fail-env.sh
if [ -n "$1" ]; then cd "$1"; fi
# possibly necessary files
[ ! -e bochsrc ] && echo 'Warning: no bochsrc found' >&2
[ ! -e BIOS-bochs-latest ] && echo 'Warning: no BIOS-bochs-latest found' >&2
[ ! -e vgabios.bin ] && echo 'Warning: no vgabios.bin found' >&2
# necessary files
[ ! -e client.sh ] && cp -v $SCRIPTDIR/client.sh .
[ ! -e multiple-clients.sh ] && cp -v $SCRIPTDIR/multiple-clients.sh .
# add fail-client binary if it doesn't exist
if [ -e fail-client ]
then
echo 'Info: Using local "fail-client" binary.' >&2
else
cp -v $(which fail-client) .
strip fail-client
fi
# sync everything to experiment hosts
for h in $FAIL_DISTRIBUTE_HOSTS
do
echo Distributing to $h ...
rsync -az --partial --delete --delete-excluded --exclude=core . $h:"$FAIL_EXPERIMENT_TARGETDIR" &
done
wait
echo "Done."