Closed domcleal closed 8 years ago
On the one hand I'm not a big fan of using bash, especially as Debian switched to dash, but I'd say get this in now to fix things and let the freight package depend on bash and see what can be done to make it POSIX compatible again later, if that's worth the effort.
BTW, I'll be playing around with https://github.com/koalaman/shellcheck in the near future and will open a PR to add it to the travis test so such issues can get detected beforehand.
Changing it back later might be difficult as I used arrays in the config file for the list of GPG key IDs. It'd be better for me to rewrite it in a POSIX style with a string of key uids so config files are POSIX from the start.
If consensus is that POSIX is preferred, I'll open a PR with that change instead.
Then I'd say :+1: to this, unless @mattock objects.
bin/freight-add also needs similar changes for more tests to pass on my local machine (with dash as /bin/sh) and even bin/freight needs the /bin/bash header
I'd prefer POSIX-compliant scripts, unless that makes things very complicated.
Fine by me, I'll open a new PR shortly with a POSIX-compatible syntax.
Permits use of bash arrays in the multiple GPG support.
Fixes #8
The oddity with the semicolons in the case statement is that without them, bash seems to create subshells preventing the variables from taking effect.
Caught by the tests in #9 :smile: