#!/bin/bash

set -e

os="$1"
codename="$2"

if [[ -z "$os" ]] || [[ -z "$codename" ]]; then
  echo "Usage: $0 <os> <codename>" >&2
  exit 1
fi

cd "$(dirname "$0")"

./build-tarball "$os" "$codename" && ./build-rpm "$os" "$codename" && \
  ./test-rpm "$os" "$codename"
