debops / ansible-pki

Bootstrap and manage internal PKI, Certificate Authorities and OpenSSL/GnuTLS certificates
GNU General Public License v3.0
65 stars 29 forks source link

Checked and fixed possible quoting problems using shellcheck. #58

Closed ypid closed 8 years ago

ypid commented 8 years ago

There are still a number of open warnings reported by shellcheck but they are not as easy to fix as quoting.

This PR is not really tested and I am not 100 % sure that I did not introduce bugs by this rework. Unfortunately I did not find a tool to do this quite monoton task for me.

Related to https://github.com/debops/ansible-pki/pull/57#issuecomment-217175678

@drybjed Looking throught the scripts it seems that there was a but much copy paste involved. I guess we should refactor that?

drybjed commented 8 years ago

All those modifications have been made by shellcheck, I presume?

Yeah, moving repetitive code into separate functions might be needed, although I would release a working version first. And perhaps that could be combined with variable rename.

ypid commented 8 years ago

All those modifications have been made by shellcheck, I presume?

Sadly not. As said I could not find a tool to do that task. I did it manually …

Yeah, moving repetitive code into separate functions might be needed, although I would release a working version first. And perhaps that could be combined with variable rename.

Sure. That would be a bigger refactoring to do with the potential of breaking things.