esmero / archipelago-deployment

Archipelago Commons Docker Deployment Repository
33 stars 15 forks source link

ISSUE-231: import_export.sh script encoding/escaping bug #232

Closed aksm closed 1 year ago

aksm commented 1 year ago

Resolves #231.

Passing through json_pp -json_opt escape_slash before writing to file restores the parsed out forward slash.

DiegoPino commented 1 year ago

@aksm thanks, is json_pp installed?

aksm commented 1 year ago

@DiegoPino we're currently recommending that the script be run on the host so it'll have to be added to the documentation. Seems like it comes standard on most Linux distros. Also just noticing that the docs don't mention that jq is required so this will be a good moment to add that too.

DiegoPino commented 1 year ago

Can you please add a which jq and with json_pp to the initial run as test? If those are empty then it should not run. Docs are also needed but most people will try to run it without docs and there will be a LOT of unnecessary pulling/unexpected and errors if those are not there

aksm commented 1 year ago

@DiegoPino All set! I went with command -v for the check as suggested here: https://stackoverflow.com/questions/592620/how-can-i-check-if-a-program-exists-from-a-bash-script.

DiegoPino commented 1 year ago

Good. that makes sense and it is posix compatible. Thanks!