Jacob C's picture

Hey there, the script Jeremy offered is no longer working (for some reason, wget can't connect to the URL). I changed it a little and got it to work using `git clone` instead of wget. It's not very pretty, but it worked! I figured I would share. Here is what I used:
#!/bin/bash
git clone https://github.com/turnkeylinux/common.git /tmp/common
CODENAME=bullseye
key_dir=/usr/share/keyrings
base_url=/tmp/common/overlays/bootstrap_apt
repos=(main security testing)
for repo in ${repos[@]}; do
    local_path=$key_dir/tkl-$CODENAME-$repo
    keyring=$local_path.gpg
    keyfile=$local_path.asc
     key_url=${base_url}${keyfile}
    #wget -O $keyfile $key_url
    cp $key_url $keyfile
    gpg --no-default-keyring --keyring $keyring --import $keyfile
    rm $keyfile
rm -r /tmp/common
done