#!/bin/sh
set -e  # Exit on errors.

if [ "$#" -ne 2 ]; then
    echo "Usage: $0 srcdir rundir"
    exit 1
fi

srcdir="$1"
rundir="$2"

rsync -av --progress "$srcdir" "$rundir" \
    --exclude ".git" \
    --exclude "*/_build" \
    --exclude "*.egg-info"

cd "$rundir"
tox

Add script to run rsync then tox
Add script to run rsync then tox

This script is useful if tox can't be run in the source directory where
editing takes place. For example when editing on a (Windows) host and
running tox in a (Linux) guest VM, the shared folder filesystem doesn't
allow symlinks etc, thereby breaking tox. This script allows a single
efficient command to sync changes to a (temporary) run directory where
the filesystem does support tox.
