Newer
Older
dub_jkp / test / issue674-concurrent-dub.sh
#!/bin/bash

set -e -o pipefail

TMPDIR=$(mktemp -d)
echo ${TMPDIR}

function cleanup {
    rm -rf ${TMPDIR}
}
trap cleanup EXIT

cd ${TMPDIR} && $DUB fetch --cache=local bloom &
pid1=$!
cd ${TMPDIR} && $DUB fetch --cache=local bloom &
pid2=$!
wait $pid1
wait $pid2
if [ ! -d ${TMPDIR}/bloom* ]; then
    exit 1
fi