#!/bin/bash
set -e

username=$1
shift

for f in "$@"
do
    ./compile.sh $f $RANDOM $f CO &
done

for job in `jobs -p`
do
echo $job
    wait $job || let "FAIL+=1"
done

./link_and_load.sh $username "$@"
