diff options
| author | Jesse Morgan <jesse@jesterpm.net> | 2013-09-03 07:02:59 -0700 | 
|---|---|---|
| committer | Jesse Morgan <jesse@jesterpm.net> | 2013-09-03 07:03:26 -0700 | 
| commit | 235e27865559a72a903be28fd33cfeb8759730b4 (patch) | |
| tree | a13565dc68c52d213bb78baeb648a6917f7ad267 /devfiles/scripts | |
| parent | aace86e8d6dfd7d5db7e882d631c5ea91983ccdb (diff) | |
New account page improvements and renumbered questions.
Diffstat (limited to 'devfiles/scripts')
| -rwxr-xr-x | devfiles/scripts/bootstrap-cassandra.sh | 6 | ||||
| -rwxr-xr-x | devfiles/scripts/compile-questions.sh | 17 | 
2 files changed, 20 insertions, 3 deletions
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  | 
