forked from RLOpenCatalyst/rgdeploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makestudies.sh
executable file
·32 lines (32 loc) · 932 Bytes
/
makestudies.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
while IFS=$'\n' read -r c; do
if [ "$c" == "q" ]; then
echo "$c" >&2
exit 0
fi
echo "$c" | yq -o=json eval '.' "$c" |
jq -r '{
name: .Name,
description: .Description,
tags:.Tags,
resourceDetails:(
.Resources|map({
description: .Description,
arn: .ARN,
region: .Region,
type: (.Type|select(.=="S3 Bucket")| "s3")}
)
),
moreInformation: (.License+"\n"+.Documentation+"\n"+.Contact),
bookmarkedBy: [],
projectId: [],
levelOfSharing: 0,
sharedTo: [],
studyType: "Public",
__v: 0,
isDeleted: false,
repositoryName: "Registry of Open Data on AWS",
isShared: false,
isLinked: false
}'
done | jq -s