#!/bin/sh

set -e

PACKAGE=$1
BASE=$PWD
VERSION=${BASE##*-}

if ! [ -f build/ocaml-$VERSION.tgz ]; then
    echo "build/ocaml-$VERSION.tgz is missing!"
    exit 1
fi

pbuilder update --basetgz build/ocaml-$VERSION.tgz --bindmounts "$BASE"
