Skip to content

Commit

Permalink
deleted api DP files. added flatten.sh. Modified build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Darrenn Jackson committed Apr 25, 2024
1 parent 4c43759 commit a0e9111
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/portal/developer-portal/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ mkdir -m777 -p build/Markdown
echo "Building SHS Install Guide";

# This line builds the HPESC HTML bundle for the install guide
dita -i tmp/shs_install_guide.ditamap -o build/install -f HPEscHtml5 && cp install_publication.json build/install/publication.json && cd build/install/ && zip -r crs8032_@docid_suffix@en_us.zip ./
dita -i tmp/shs_install_guide.ditamap -o build/install -f HPEscHtml5 && cp shs_install_publication.json build/install/publication.json && cd build/install/ && zip -r crs8032_@docid_suffix@en_us.zip ./
cd $THIS_DIR
# This builds the PDF using DITA-OT's default PDF transform
dita -i shs_install_guide.ditamap -o build/PDF/install -f pdf
Expand Down
2 changes: 0 additions & 2 deletions docs/portal/developer-portal/direct_publish_hpesc.sh

This file was deleted.

2 changes: 0 additions & 2 deletions docs/portal/developer-portal/direct_publish_itg.sh

This file was deleted.

16 changes: 16 additions & 0 deletions docs/portal/developer-portal/flatten.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# create tmp subdir
mkdir tmp
#mkdir tmp/images
# copy all markdown files to the tmp subdir
cp ./*/*.md tmp/
# copy all images to the tmp subdir
#cp ./*/*/*.png tmp/images/
# copy ditamap to the tmp subdir
cp ./*.ditamap tmp/
# convert links in the ditamap
sed -i 's/overview\///' tmp/shs_install_guide.ditamap
sed -i 's/install\///' tmp/shs_install_guide.ditamap

# convert all links in all Markdown files.
declare -a prefixes=("\.\.\/install" "\.\.\/overview")
for file in $(ls tmp/*.md);do for prefix in ${prefixes[@]}; do sed -i "s/$prefix\///g" $file;done;done

0 comments on commit a0e9111

Please sign in to comment.