34 lines
890 B
Bash
Executable File
34 lines
890 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2024 Joshua Rich <joshua.rich@gmail.com>
|
|
#
|
|
# This software is released under the MIT License.
|
|
# https://opensource.org/licenses/MIT
|
|
|
|
set -e
|
|
|
|
# set arch as appropriate
|
|
case $1 in
|
|
linux/amd64) arch=(amd64) ;;
|
|
linux/arm/*) arch=(armhf) ;;
|
|
linux/arm64) arch=(arm64) ;;
|
|
all) arch=(armhf arm64 amd64) ;;
|
|
*) echo "No arch specified" && exit -1 ;;
|
|
esac
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
# install runtime dependencies as appropriate for given arch
|
|
apt-get update
|
|
for a in "${arch[@]}"; do
|
|
apt-get -y install --no-install-recommends \
|
|
libgl1:${a} libx11-6:${a} libglx0:${a} \
|
|
libglvnd0:${a} libxcb1:${a} libxau6:${a} \
|
|
libxdmcp6:${a} dbus-x11:${a}
|
|
done
|
|
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
|
|
|
apt-get -y autoremove && apt-get -y clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
exit 0
|