If you are on Linux Mint, there is an easy and correct solution (for the time being):
(For plain Ubuntu, see below.)
There is a version available that works fine, but itβs somehow not in the repositories for literal months now. (I would be ashamed, if I were the maintainer.)
You can install it ma...
It seems the Mint guys have done their own fixed version - but I wonder why the official APT developers don't have this as a priority?
There was a time when this site got 3-4 questions per day about apt keys, because people were confused..
Indeed, the lack of official response to this also prompted me to make my own apt key installation script, also found in the thread..
Nice script, @ArturMeinild. But what is this supposed to be doing?
# Check argument 2 for keypath
case "$2" in
# $2 is only a path (ending with /)
/*/)
keypath="${2%/*}"
;;
# $2 is a path
/*)
keypath="${2%/*}"
;;
esac
As far as I can tell, in both cases you run the same command.
In any case, I really don't think you need it since ///// is equivalent to / even in POSIX. Try cd /usr///////////////////////local/bin for example and it will work just fine.
That said, I have to say it is a huge pleasure to read through 100 lines of shell code and not find a single example of common bad practices! :)