#!/bin/bash

RELEASE="${1:-"unknown"}"

RELEASES="stable unstable"

if [[ ! $RELEASES =~ $RELEASE ]]; then
    echo "Release not allowed" >&2
    echo "Allowed releases: $RELEASES"
    exit 1
fi

wget -q -O - "http://mirror.xivo.solutions/version/${RELEASE}"
