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

54 lines
1.3 KiB
Bash
Raw Normal View History

#!/bin/bash
# A bash script to add protocol info directory skeleton
2021-04-23 19:53:02 +00:00
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
mkdir -p ./protocols/$1
mkdir -p ./protocols/$1/resources
mkdir -p ./protocols/$1/resources
mkdir -p ./protocols/$1/resources/calls
mkdir -p ./protocols/$1/resources/Gov Weekly
mkdir -p ./protocols/$1/contracts
touch ./protocols/$1/contracts/token.json
2021-04-22 17:46:44 +00:00
2021-04-23 19:53:02 +00:00
touch ./protocols/$1/index.json
touch ./protocols/$1/events.json
touch ./protocols/$1/overview.md
touch ./protocols/$1/logo.png
touch ./protocols/$1/header.png
2021-04-22 18:06:42 +00:00
2021-04-23 19:53:02 +00:00
printf '{
"cname": "'"$1"'",
2021-04-27 19:22:57 +00:00
"name": "'"$4"''"$5"''"$6"'",
2021-04-22 18:19:28 +00:00
"description": "",
2021-04-27 17:28:09 +00:00
"path": "'"$1"'",
2021-04-22 18:19:28 +00:00
"previousPaths": [],
2021-04-23 19:53:02 +00:00
"folder": "'"$1"'",
2021-04-22 18:19:28 +00:00
"type": "snapshot",
2021-04-27 17:28:09 +00:00
"suffix": "'"$3"'",
2021-04-22 18:19:28 +00:00
"coinGeckoPriceString": "",
2021-04-23 19:53:02 +00:00
"tokenContractAddress": "'"$2"'",
2021-04-22 18:19:28 +00:00
"isEnabled": false,
"hasOnchain": false,
"isHybrid": false,
"hasDelegation": false,
2021-04-27 17:28:09 +00:00
"snapshotSpaceName": "'"$1"'",
2021-04-22 18:19:28 +00:00
"invalidSnapshots": [],
2021-04-27 17:28:09 +00:00
"branding": {
"primaryColor": "",
"accentColor": ""
},
"discourseForum": {
"url": "",
"categoryId": ""
},
"safeAddress": null,
"disableTreasuryNav": false
2021-04-23 19:53:02 +00:00
}' >| ./protocols/$1/index.json
fi
2021-04-22 18:19:28 +00:00
echo "Arg 1: $1"