Skip to content

Instantly share code, notes, and snippets.

@aimerneige
Created January 2, 2022 08:42
Show Gist options
  • Save aimerneige/0f47057a28ac0ee5b1f3dbd9dcfe5ff6 to your computer and use it in GitHub Desktop.
Save aimerneige/0f47057a28ac0ee5b1f3dbd9dcfe5ff6 to your computer and use it in GitHub Desktop.
RAML GENERATE SCRIPT
#!/bin/bash
# Copyright (c) 2021 AimerNeige
# [email protected]
# All rights reserved.
PS3='Please enter your choice: '
options=("raml2html-default-theme" "raml2html-plain-theme" "raml2html-slate-theme" "raml2html-kaa-theme" "raml2html-full-markdown-theme" "Quit")
select opt in "${options[@]}"
do
case $opt in
"raml2html-default-theme")
echo "you chose raml2html-default-theme"
raml2html --theme 'raml2html-default-theme' api.raml > api.html
break
;;
"raml2html-plain-theme")
echo "you chose raml2html-plain-theme"
raml2html --theme 'raml2html-plain-theme' api.raml > api.html
break
;;
"raml2html-slate-theme")
echo "you chose raml2html-slate-theme"
raml2html --theme 'raml2html-slate-theme' api.raml > api.html
break
;;
"raml2html-kaa-theme")
echo "you chose raml2html-kaa-theme"
raml2html --theme 'raml2html-kaa-theme' api.raml > api.html
break
;;
"raml2html-full-markdown-theme")
echo "you chose raml2html-kaa-theme"
raml2html --theme 'raml2html-full-markdown-theme' api.raml > api.md
break
;;
"Quit")
break
;;
*) echo "invalid option $REPLY";;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment