From 09d15858e2212cbe54936a9c77a4f5abc5e29db9 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 17 Dec 2024 22:29:09 -0800 Subject: [PATCH] Fix some issues with PKGBUILD --- PKGBUILD | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index c64a924..5a55f63 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,19 +1,26 @@ pkgname=laminar-config -pkgver=1 +pkgver=20241217 pkgrel=1 arch=("any") +pkgver() +{ + cd "${srcdir}/${pkgname}" + git --git-dir ../.git log -1 --pretty=format:"%cd" --date=short | sed s/-//g +} + prepare() { - if git status; then - git pull + if [[ -d "${srcdir}/${pkgname}" ]]; then + cd "${srcdir}/${pkgname}" && git pull origin else - git clone ../.git "${srcdir}" + 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}"