Scripts to sign packages and create repository.

This commit is contained in:
2026-07-31 16:35:30 +02:00
parent 16c5046636
commit 0a013aa05a
2 changed files with 37 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
repodir=$1
reponame=kira-base
pattern="*.pkg.tar.zst"
# Combine directory and pattern.
# Quote the directory to handle spaces, leave pattern unquoted for expansion.
for pkgfile in "$repodir"/$pattern; do
# CRITICAL: Check if file exists.
# If no files match, 'sh' returns the literal string (e.g., /dir/*.txt)
if [ -e "$pkgfile" ]; then
echo "Signing $pkgfile"
repo-add --verify --sign "$repodir"/"$reponame".db.tar.gz "${pkgfile}"
fi
done
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
repodir=$1
pattern="*.pkg.tar.zst"
# Combine directory and pattern.
# Quote the directory to handle spaces, leave pattern unquoted for expansion.
for pkgfile in "$repodir"/$pattern; do
# CRITICAL: Check if file exists.
# If no files match, 'sh' returns the literal string (e.g., /dir/*.txt)
if [ -e "$pkgfile" ]; then
echo "Signing $pkgfile"
gpg --use-agent --output "${pkgfile}".sig --detach-sig "${pkgfile}"
fi
done