boardroom-inc-protocol-Info/scripts/add_new_protocol.sh

50 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
# A bash script to add protocol info directory skeleton
for arg in "$@"
do
if [ "$arg" == "--help" ] || [ "$arg" == "-h" ]
then
echo "Pass in the name of the protocol whose info you want to add. e.g: ./add_new_protocol.sh rarible"
else
2021-04-22 18:06:42 +00:00
mkdir -p ./protocols/$arg
2021-04-22 17:46:44 +00:00
2021-04-22 18:06:42 +00:00
mkdir -p ./protocols/$arg/resources
mkdir -p ./protocols/$arg/resources/calls
mkdir -p ./protocols/$arg/resources/Gov Weekly
2021-04-22 17:46:44 +00:00
2021-04-22 18:06:42 +00:00
mkdir -p ./protocols/$arg/contracts
touch ./protocols/$arg/contracts/governance.json
touch ./protocols/$arg/contracts/token.json
2021-04-22 17:46:44 +00:00
2021-04-22 18:06:42 +00:00
touch ./protocols/$arg/index.json
touch ./protocols/$arg/events.json
touch ./protocols/$arg/overview.md
touch ./protocols/$arg/logo.png
touch ./protocols/$arg/header.png
2021-04-22 18:19:28 +00:00
echo '{
"cname": "",
"name": "",
"description": "",
"path": "",
"previousPaths": [],
"folder": "",
"type": "snapshot",
"suffix": "",
"coinGeckoPriceString": "",
"tokenContractAddress": "",
"isEnabled": false,
"hasOnchain": false,
"isHybrid": false,
"hasDelegation": false,
"snapshotSpaceName": "",
"invalidSnapshots": [],
"branding": {},
"discourseForum": {},
"safeAddress": null
}' >> ./protocols/$arg/index.json
fi
done
2021-04-22 18:19:28 +00:00
echo "Arg 1: $1"