Files
g15keyboard/packaging/rebuild.sh
T
2026-09-07 16:23:19 +03:00

24 lines
738 B
Bash

#!/bin/bash
# Standalone source QA: mount artifacts and this script, NOT the repository.
set -euo pipefail
export LC_ALL=C
[[ -f /.dockerenv && $EUID == 0 ]] || exit 1
out=$(realpath "${1:?artifact directory}")
(cd "$out" && sha256sum -c SHA256SUMS)
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
export DEB_BUILD_OPTIONS=parallel=2
for source in libg15 libg15render g15daemon g15macro g15stats; do
mkdir "$work/$source"
cd "$work/$source"
dsc=("$out/${source}_"*.dsc)
[[ ${#dsc[@]} == 1 ]]
dpkg-source -x "${dsc[0]}" tree
cd tree
apt-get build-dep -y .
dpkg-buildpackage -us -uc -b
cd ..
apt-get install -y ./*.deb
done
echo 'PASS: all five source artifacts rebuilt standalone in dependency order.'