Skip to content

Instantly share code, notes, and snippets.

@chessmango
chessmango / README.md
Last active July 31, 2023 15:50
Simple Bash add-apt-repository drop-in

Things are awkward in the apt world while apt-key is deprecated and things like Launchpad and general PPA usage are in flux.

This snippet attempts to replicate add-apt-repository functionality for sanity, probably quite badly. There's no error checking or anything advanced, but at least the script is easy to understand.

Syntax: [sudo] addaptrepo.sh <repo-string> <gpg-key-fingerprint>

Then follow up with [sudo] apt-get update. I'm not making that call for you :P

You can find the gpg key fingerprint for a Launchpad repo by expanding Technical details about this PPA.

Keybase proof

I hereby claim:

  • I am chessmango on github.
  • I am chessmango (https://keybase.io/chessmango) on keybase.
  • I have a public key whose fingerprint is A4A5 1057 8BED 6A84 8378 093E A5BD A248 925A D68C

To claim this, I am signing this object: