sci/scripts/package-sci-arch.sh
Asger Gitz-Johansen 347c8605c9 fix: automate arch packaging
using docker just like debian. This makes the scripts easier to
reproduce.
2024-08-19 20:37:18 +02:00

22 lines
603 B
Bash
Executable File

#!/bin/bash
archbuilder_image=$(docker images | grep archbuilder)
set -e
if [ -z $archbuilder_image ]; then
echo "building archbuilder image..."
docker build -t archbuilder -f arch-builder.dockerfile .
fi
echo "building source dist..."
make dist
SRC_SHA256=$(sha256sum sci-1.0.0.tar.gz | awk '{ print $1 }')
echo $SRC_SHA256
sed "s/SRC_SHA256/$SRC_SHA256/g" < PKGBUILD.in > PKGBUILD
echo "building arch package in archbuilder docker image..."
docker run --rm -it -v .:/src archbuilder sh -c '\
cd && \
cp /src/sci-1.0.0.tar.gz /src/PKGBUILD . && \
makepkg && \
cp *.zst /src
'