0g-chain/docs/pre.sh
Denali Marsh 2d7f5c4080
[R4R] Better docs (#541)
* update sidebar order

* update event backticks

* fix broken links

* fix spelling
2020-06-03 14:54:31 -04:00

37 lines
869 B
Bash
Executable File

#!/usr/bin/env bash
mkdir -p Modules
for D in ../x/*; do
if [ -d "${D}" ]; then
rm -rf "Modules/$(echo $D | awk -F/ '{print $NF}')"
mkdir -p "Modules/$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/spec/* "$_"
fi
done
baseGitUrl="https://raw.githubusercontent.com/Kava-Labs"
# Client docs (JavaScript SDK)
clientGitRepo="javascript-sdk"
clientDir="building"
mkdir -p "./${clientDir}"
curl "${baseGitUrl}/${clientGitRepo}/master/README.md" -o "./${clientDir}/${clientGitRepo}.md"
echo "---
parent:
order: false
---" > "./${clientDir}/readme.md"
# Kava Tools docs
toolsGitRepo="kava-tools"
toolsDir="tools"
toolDocs=("auction" "oracle")
mkdir -p "./${toolsDir}"
for T in ${toolDocs[@]}; do
curl "${baseGitUrl}/${toolsGitRepo}/master/${T}/README.md" -o "./${toolsDir}/${T}.md"
done
echo "---
parent:
order: false
---" > "./${toolsDir}/readme.md"