laminar-config/PKGBUILD
Tom Willemse fdeea51317 Fix version format
I'm doing a bunch of builds every couple of minutes, having it just versioned by
day isn't enough.
2024-12-17 22:36:52 -08:00

31 lines
648 B
Bash

pkgname=laminar-config
pkgver=20241217.2229
pkgrel=1
arch=("any")
pkgver()
{
cd "${srcdir}/${pkgname}"
git log -1 --pretty=format:"%cd" --date=format:"%Y%m%d.%H%M" | sed s/-//g
}
prepare()
{
if [[ -d "${srcdir}/${pkgname}" ]]; then
cd "${srcdir}/${pkgname}" && git pull origin
else
git clone ../.git "${srcdir}/${pkgname}"
fi
}
package()
{
cd "${srcdir}/${pkgname}"
for d in contexts jobs scripts; do
mkdir -vp "${pkgdir}/var/lib/laminar/cfg/${d}"
for f in $(find "$d" -type f -not -name '.*'); do
install "$f" "${pkgdir}/var/lib/laminar/cfg/${f}"
done
done
}