From 770644c452b8c2dc6f0d81dc62f24f36cabacd20 Mon Sep 17 00:00:00 2001 From: Fernando Flores Date: Fri, 2 Feb 2024 12:14:25 -0600 Subject: [PATCH 1/2] Modifed doc scripts to ensure compatibility between MacOs and GNU sed commands --- docs/scripts/post-zos_apf.sh | 2 +- docs/scripts/pre-template.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 From 32a58304255b6d1c55a87f247450c3f4f7510675 Mon Sep 17 00:00:00 2001 From: Fernando Flores Date: Fri, 2 Feb 2024 12:23:56 -0600 Subject: [PATCH 2/2] Added changelog --- changelogs/fragments/1202-doc-gen-script-portability.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelogs/fragments/1202-doc-gen-script-portability.yml 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).