You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
706 B

#!/bin/bash
set -eu
IMAGE="debian:buster-slim"
TARGET="$(dirname "$0" | xargs realpath)"
VERSION="v0.8.0"
while getopts "v:i:h" opt
do
case "$opt" in
v)
VERSION="$OPTARG"
;;
i)
IMAGE="$OPTARG"
;;
h)
echo "Usage: $0 [-i image] [-v version]"
exit 0
;;
*)
exit 1
;;
esac
done
main() {
docker run --rm --name alacritty-build-$$ \
--volume "$TARGET:/target" \
--workdir /target \
--env "VERSION=$VERSION" \
--user root "$IMAGE" \
sh entrypoint.sh
}
main