2020-05-28 22:11:30 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-06-15 11:11:29 +00:00
|
|
|
# Clone each module's markdown files
|
2020-06-02 01:49:13 +00:00
|
|
|
mkdir -p Modules
|
|
|
|
|
2020-05-28 22:11:30 +00:00
|
|
|
for D in ../x/*; do
|
|
|
|
if [ -d "${D}" ]; then
|
2020-06-02 01:49:13 +00:00
|
|
|
rm -rf "Modules/$(echo $D | awk -F/ '{print $NF}')"
|
2020-06-03 18:54:31 +00:00
|
|
|
mkdir -p "Modules/$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/spec/* "$_"
|
2020-05-28 22:11:30 +00:00
|
|
|
fi
|
2020-06-02 01:49:13 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
baseGitUrl="https://raw.githubusercontent.com/Kava-Labs"
|
|
|
|
|
|
|
|
# Client docs (JavaScript SDK)
|
|
|
|
clientGitRepo="javascript-sdk"
|
2020-06-03 18:54:31 +00:00
|
|
|
clientDir="building"
|
2020-06-02 01:49:13 +00:00
|
|
|
|
|
|
|
mkdir -p "./${clientDir}"
|
|
|
|
curl "${baseGitUrl}/${clientGitRepo}/master/README.md" -o "./${clientDir}/${clientGitRepo}.md"
|
2020-06-03 18:54:31 +00:00
|
|
|
echo "---
|
2020-08-31 13:46:39 +00:00
|
|
|
parent:
|
2020-06-03 18:54:31 +00:00
|
|
|
order: false
|
|
|
|
---" > "./${clientDir}/readme.md"
|
2020-06-02 01:49:13 +00:00
|
|
|
|
2020-06-15 11:11:29 +00:00
|
|
|
# Copy the kava-3-migration guide
|
|
|
|
cp ../contrib/kava-3/migration.md "./${clientDir}/kava-3-migration-guide.md"
|
|
|
|
|
2020-06-02 01:49:13 +00:00
|
|
|
# Kava Tools docs
|
|
|
|
toolsGitRepo="kava-tools"
|
2020-06-03 18:54:31 +00:00
|
|
|
toolsDir="tools"
|
2020-06-02 01:49:13 +00:00
|
|
|
toolDocs=("auction" "oracle")
|
|
|
|
|
|
|
|
mkdir -p "./${toolsDir}"
|
|
|
|
for T in ${toolDocs[@]}; do
|
|
|
|
curl "${baseGitUrl}/${toolsGitRepo}/master/${T}/README.md" -o "./${toolsDir}/${T}.md"
|
|
|
|
done
|
2020-08-31 13:46:39 +00:00
|
|
|
|
2020-09-15 11:20:35 +00:00
|
|
|
# Add Go tools
|
|
|
|
goToolsGitRepo="go-tools"
|
|
|
|
goToolsDocs=("sentinel")
|
|
|
|
|
|
|
|
for T in ${goToolsDocs[@]}; do
|
|
|
|
curl "${baseGitUrl}/${goToolsGitRepo}/master/${T}/README.md" -o "./${toolsDir}/${T}.md"
|
|
|
|
done
|
|
|
|
|
2020-08-31 13:46:39 +00:00
|
|
|
# Copy the community tools
|
|
|
|
cp communitytools.md "./${toolsDir}/community.md"
|
2020-06-03 18:54:31 +00:00
|
|
|
echo "---
|
2020-08-31 13:46:39 +00:00
|
|
|
parent:
|
2020-06-03 18:54:31 +00:00
|
|
|
order: false
|
2020-08-31 13:46:39 +00:00
|
|
|
---" > "./${toolsDir}/readme.md"
|