Jeremy Davis's picture

Yep, to upgrade to bullseye, all 'buster' entries should be upgraded to 'bullseye', I'll update my post.

As for running, it, I intended for it to just be copy/pasted into the commandline (with CODENAME=bullseye to upgrade to bullseye...). That should "just work".

But you can run it from a script too if you want. Judging from the fact that the script is erroring at the bashism on line 4, my guess is that it's guessing from the filename and just running with /bin/sh (not /bin/bash). If you want to run it as a script it needs to be explicitly run by bash. You could just run it with bash, like this:

bash keyimport.sh

But better still, give it a bash shebang. Insert a new line at the top of your script:

#!/bin/bash -e

Thats called a shebang and it tell the system to run the script with '/bin/bash'. The '-e' is a bash option that makes the script exit if it encounters and error (good practice).

As noted, be usre ot change the 'CODENAME=' line to 'bullseye' - i.e.:

'CODENAME=bullseye