diff --git a/changelogs/fragments/1202-doc-gen-script-portability.yml b/changelogs/fragments/1202-doc-gen-script-portability.yml new file mode 100644 index 000000000..3c2e6ddbb --- /dev/null +++ b/changelogs/fragments/1202-doc-gen-script-portability.yml @@ -0,0 +1,4 @@ +trivial: + - docs/scripts - Change to sed "-i" in place option which ensures compatibility between MacOS + and GNU versions of sed command. + (https://github.com/ansible-collections/ibm_zos_core/pull/1202). diff --git a/docs/scripts/post-zos_apf.sh b/docs/scripts/post-zos_apf.sh index befcaecfe..d7ce5472b 100755 --- a/docs/scripts/post-zos_apf.sh +++ b/docs/scripts/post-zos_apf.sh @@ -28,5 +28,5 @@ SCRIPT_DIR=`dirname "$0"` CURR_PATH=`pwd` # Delete any temporary index RST if [[ -f $CURR_PATH/source/modules/zos_apf.rst ]]; then - sed -i '' "s/\> \\*\//\> \\\*\//g" $CURR_PATH/source/modules/zos_apf.rst + sed -i'' -e "s/\> \\*\//\> \\\*\//g" $CURR_PATH/source/modules/zos_apf.rst fi diff --git a/docs/scripts/pre-template.sh b/docs/scripts/pre-template.sh index ca35775d9..3a2ac16d4 100755 --- a/docs/scripts/pre-template.sh +++ b/docs/scripts/pre-template.sh @@ -27,6 +27,6 @@ template_doc_source=`ansible-config dump|grep DEFAULT_MODULE_PATH| cut -d'=' -f2|sed 's/[][]//g' | tr -d \'\" |sed 's/modules/doc_fragments\/template.py/g'` cp $template_doc_source $template_doc_source.tmp -sed -i '' "s/\"\\\\n\"/'\\\\\\\\n'/g" $template_doc_source -sed -i '' "s/\"\\\\r\"/'\\\\\\\\r'/g" $template_doc_source -sed -i '' "s/\"\\\\r\\\\n\"/'\\\\\\\\r\\\\\\\\n'/g" $template_doc_source +sed -i'' -e "s/\"\\\\n\"/'\\\\\\\\n'/g" $template_doc_source +sed -i'' -e "s/\"\\\\r\"/'\\\\\\\\r'/g" $template_doc_source +sed -i'' -e "s/\"\\\\r\\\\n\"/'\\\\\\\\r\\\\\\\\n'/g" $template_doc_source