Skip to content

Instantly share code, notes, and snippets.

@JedMeister
Last active July 3, 2024 21:24
Show Gist options
  • Select an option

  • Save JedMeister/2d9f7605869c804fbb707914453c23cb to your computer and use it in GitHub Desktop.

Select an option

Save JedMeister/2d9f7605869c804fbb707914453c23cb to your computer and use it in GitHub Desktop.
#!/bin/bash -ex
# download and load new keys
base_url=https://raw.githubusercontent.com/turnkeylinux/common
key_dir=usr/share/keyrings
local_path=$key_dir/tkl-bullseye
remote_path=$base_url/18.x/overlays/bootstrap_apt
repos=(main security testing)
for repo in ${repos[@]}; do
key_path=$local_path-$repo
keyfile=$key_path.asc
wget -O /$keyfile $remote_path/$keyfile
keyring=$key_path.gpg
gpg --no-default-keyring --keyring /$keyring --import /$keyfile
rm /$keyfile
done
# fix sources.lists
src_dir=/etc/apt/sources.list.d
for file in $src_dir/sources.list \
$src_dir/security-sources.list \
$src_dir/turnkey-testing.list.disabled; do
sed -i 's|buster|bullseye|' $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment