debrepo/scripts/gpgSign.sh

21 lines
501 B
Bash
Raw Normal View History

#!/bin/sh
REPODIR="$1"
2023-05-08 11:08:25 +02:00
DISTRO="$3"
. $REPODIR/apt-repo/config
2023-05-08 11:08:25 +02:00
if [ ! $DISTRO ]; then
DISTRO="stable"
fi
if [ ! $DEFAULT_GPG ]; then
echo "error: no gpg key provided in config file"
exit 1
fi
KEY=$DEFAULT_GPG
2023-04-27 15:20:02 +02:00
echo "debrepo: signing using $KEY"
2023-05-08 11:08:25 +02:00
cat $REPODIR/apt-repo/dists/$DISTRO/Release | gpg --default-key $KEY -abs > $REPODIR/apt-repo/dists/$DISTRO/Release.gpg
cat $REPODIR/apt-repo/dists/$DISTRO/Release | gpg --default-key $KEY -abs --clearsign > $REPODIR/apt-repo/dists/$DISTRO/InRelease