summaryrefslogtreecommitdiff
path: root/devfiles/scripts/compile-questions.sh
blob: 7f108b8602391647786d924c9d339f25d8d64d11 (plain)
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
# Dump Cassandra commands to setup questions

FIRST=""
COUNT=0

for i in $DEVFILES/questions/*.json; do
    id=`basename $i .json`
    if [ -z "$FIRST" ]; then
        FIRST=$id
    fi
    echo "set strings['/questions/${id}']['value'] = '"
    cat $i
    echo "';"
    COUNT=$((COUNT + 1))
done

# Create Summary
cat << EOF
set strings['/questions']['value'] = '
{
    "first": "$FIRST",
    "count": $COUNT
}
';
EOF