Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.03 KB

README.md

File metadata and controls

49 lines (33 loc) · 1.03 KB

GitHub GitHub code size in bytes

json2shvars

Library of Register json to Shellscript variables

ko1nksm/shdotenv is recommended for .env

requirement Lib

how to use

Please place the following files.

  • json2shvars.lib..sh
  • lib/makrj.sh
  • lib/parsrj.sh

Please set the following variables.

  • _J2SVLIB
    • Path to makrj.sh, parsrj.sh

sample

sample code

# set 3rdparty Lib path
_J2SVLIB="Path/to/lib"

# include lib
_FNCFILE="${_J2SVDIR}/json2shvars.lib.sh"
. ${_FNCFILE}

# make configuration, load and delete
_configfile=$(mkConf ${_jsonfile} ${_tag})
. ${_configfile}
rm ${_configfile}

run include sample.sh

sh ./sample.sh sample.json staging _TOKEN

sh ./sample.sh sample.json production _TOKEN