From eb881fdc9b62d1b9d1f5c61f1f4077065db7e933 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Sep 2013 07:02:59 -0700 Subject: New account page improvements and renumbered questions. --- devfiles/scripts/bootstrap-cassandra.sh | 6 +++--- devfiles/scripts/compile-questions.sh | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) (limited to 'devfiles/scripts') diff --git a/devfiles/scripts/bootstrap-cassandra.sh b/devfiles/scripts/bootstrap-cassandra.sh index e0813a0..128767e 100755 --- a/devfiles/scripts/bootstrap-cassandra.sh +++ b/devfiles/scripts/bootstrap-cassandra.sh @@ -12,13 +12,13 @@ $TOOLS/scripts/setup-cassandra.sh # Bootstrap keyspace TEMPFILE=`mktemp` -cat $DEVFILES/cassandra-bootstrap.cql > $TEMPFILE +cat $DEVFILES/scripts/cassandra-bootstrap.cql > $TEMPFILE # Fill with questions -./compile-questions.sh >> $TEMPFILE +$DEVFILES/scripts/compile-questions.sh >> $TEMPFILE # Fill with videos -./compile-videos.sh >> $TEMPFILE +$DEVFILES/scripts/compile-videos.sh >> $TEMPFILE # GO! #cat $TEMPFILE | less diff --git a/devfiles/scripts/compile-questions.sh b/devfiles/scripts/compile-questions.sh index 16be5b1..7f108b8 100755 --- a/devfiles/scripts/compile-questions.sh +++ b/devfiles/scripts/compile-questions.sh @@ -1,9 +1,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 -- cgit v1.2.3