Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Better sed manipulation in all demo scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Feb 8, 2019
1 parent 28fc74e commit c4b6709
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions run-k8s-istio-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ DEMO_PROMPT="${GREEN}➜ ${CYAN}$ "
# hide the evidence
clear

sed -n '/^```bash$/,/^```$/p;/^-----$/p' README.md | \
sed -n '/^\[ -f \$PWD\/kubeconfig.conf \] && export KUBECONFIG=/,$p' | sed '1s/^/```bash\n/' | \
sed -n '/^## Install Istio$/,$p' README.md | \
sed -n '/^```bash$/,/^```$/p;/^-----$/p' | \
sed -e 's/^-----$/\
p ""\
p "################################################################################################### Press <ENTER> to continue"\
Expand Down
4 changes: 2 additions & 2 deletions run-k8s-istio-openstack-full-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ clear
# git clone https://github.com/ruzickap/k8s-istio-demo && cd k8s-istio-demo
# ./run-k8s-istio-openstack-full-demo.sh

sed -n '/^```bash$/,/^```$/p;/^-----$/p' README.md | \
sed -n '/^apt update -qq$/,$p' | sed '1s/^/```bash\n/' | \
sed -n '/^Install necessary software into the Docker container:$/,$p' README.md | \
sed -n '/^```bash$/,/^```$/p;/^-----$/p' | \
sed -e 's/^-----$/\
p ""\
p "################################################################################################### Press <ENTER> to continue"\
Expand Down
4 changes: 3 additions & 1 deletion run-k8s-istio-openstack-rook-elasticsearch-demo.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash -eux

sed -n '/^```bash$/,/^```$/p' README.md | sed '/^```*/d' | sed -n '/^terraform init -var-file=terrafrom/,/^kubectl get -l app=fluent-bit svc,pods --all-namespaces -o wide$/p' > README.sh
sed -n '/^Download Terraform components:$/,/^## Istio architecture and features$/p' README.md | \
sed -n '/^```bash$/,/^```$/p' | \
sed '/^```*/d' > README.sh

source README.sh

Expand Down

0 comments on commit c4b6709

Please sign in to comment.