#!/bin/sh -eu
# shellcheck disable=SC1091
[ -e /lxc-ci/etc/config ] && . /lxc-ci/etc/config
export https_proxy

cd /lxc-ci

# Update the repository
for _ in $(seq 10); do
    git pull -q && break
    sleep 30
done

# Update the init scripts
cd init
./update
