chore: initial sanitized public snapshot
This commit is contained in:
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
missing=()
|
||||
for command_name in cc curl git jq pkg-config xz; do
|
||||
if ! command -v "${command_name}" >/dev/null 2>&1; then
|
||||
missing+=("${command_name}")
|
||||
fi
|
||||
done
|
||||
if command -v pkg-config >/dev/null 2>&1; then
|
||||
for package_name in libssh2 openssl zlib; do
|
||||
if ! pkg-config --exists "${package_name}"; then
|
||||
missing+=("pkg-config:${package_name}")
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "${#missing[@]}" -eq 0 ]; then
|
||||
echo "Linux build dependencies are already available"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
printf 'missing Linux build dependencies: %s\n' "${missing[*]}" >&2
|
||||
echo "run this CI job as root or bake the missing dependencies into the runner image" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
jq \
|
||||
libssh2-1-dev \
|
||||
libssl-dev \
|
||||
pkg-config \
|
||||
xz-utils \
|
||||
zlib1g-dev
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
Reference in New Issue
Block a user