#!/usr/bin/env bash

set -eEo pipefail

ARCH=$(if [ "$1" == "ppc64le" ]; then echo "ppc64el"; else echo "$1"; fi)

dpkg -i "/tmp/gitlab-runner_${ARCH}.deb" "/tmp/gitlab-runner-helper-images.deb"
apt-get update
apt-get -f install -y
rm -rf /var/lib/apt/lists/*
rm "/tmp/gitlab-runner_${ARCH}.deb"
