#!/bin/sh

# the keyring in /var that gets fetched by apt-key net-update
# if it does not yet exist, copy it to avoid uneeded net copy
KEYRINGDIR="/etc/apt/trusted.gpg.d"
KEYRING="${KEYRINGDIR}/acfrmarine-archive-keyring.gpg"

if ! test -d $KEYRINGDIR; then
     mkdir -m 755 -p $KEYRINGDIR
fi

# for now just overwrite
# a smarter approach would involve merging in the new keys,
# and removed any in removed, but difficult with current
# setup as it focuses apt-key heavily on the standard gpg file
# and the ubuntu-*gpg files
cp /usr/share/keyrings/acfrmarine-archive-keyring.gpg $KEYRING
touch $KEYRING
