mirror of
https://github.com/barnumbirr/alacritty-debian.git
synced 2024-05-21 13:06:33 +02:00
d72bca4e8f
Still useful for few people :) Close #9
38 lines
709 B
Bash
Executable file
38 lines
709 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
IMAGE="debian:bullseye-slim"
|
|
TARGET="$(dirname "$0" | xargs realpath)"
|
|
VERSION="v0.12.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
|