This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# DESCRIPTION | |
# This script migrates from "apt-key" managed keys to "[signed-by=/usr/share/keyrings/...]": | |
# - loop through all lists in /etc/apt/sources.list.d | |
# - read all lines with "deb..." that do not contain "[signed-by=]" | |
# - download the GPG signature from the URL | |
# - read the key ID from the signature | |
# - download and saves the key using gpg | |
# - add "[signed-by=/usr/share/keyrings/...]" to the "deb..." line |