#!/bin/sh

# Mercurial dependency. Thanks to the share from
# the base image, the pull should be small
MERCURIAL_RUST_DEP=rust/dependencies/mercurial
hg share --noupdate /opt/mercurial/hg ${MERCURIAL_RUST_DEP}
hg -R ${MERCURIAL_RUST_DEP} pull -r ${MERCURIAL_RUST_DEP_REVISION} \
    https://foss.heptapod.net/mercurial/mercurial-devel
hg -R ${MERCURIAL_RUST_DEP} update -r ${MERCURIAL_RUST_DEP_REVISION}

# other dependencies
ln -s /opt/stepancheg/rust-protobuf rust/dependencies/
