mirror of
https://github.com/barnumbirr/alacritty-debian.git
synced 2024-05-19 12:06:33 +02:00
38 lines
710 B
Bash
Executable file
38 lines
710 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
IMAGE="debian:buster-slim"
|
|
TARGET="$(dirname "$0" | xargs realpath)"
|
|
VERSION="v0.7.2-rc1"
|
|
|
|
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
|