From 014baa6529975341a314ed7bcc21d1dd639daab5 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 27 Aug 2013 08:42:40 -0700 Subject: Adding devfiles: various scripts and data files --- devfiles/scripts/bootstrap-strings.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 devfiles/scripts/bootstrap-strings.sh (limited to 'devfiles/scripts/bootstrap-strings.sh') diff --git a/devfiles/scripts/bootstrap-strings.sh b/devfiles/scripts/bootstrap-strings.sh new file mode 100755 index 0000000..9552dcb --- /dev/null +++ b/devfiles/scripts/bootstrap-strings.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +## +## This script clears the strings ColumnFamily and then rebuilds it. +## + +export TOOLS=`awk -F= '/jesterpm\.buildtools\.root/ { print $2 }' $HOME/.jesterpm-build-tools.properties` +export DEVFILES=$(dirname $0) + +TEMPFILE=`mktemp` + +cat > $TEMPFILE << EOF +use GROW; + +drop column family strings; + +create column family strings + with key_validation_class = 'UTF8Type' + and comparator = 'UTF8Type' + and default_validation_class = 'UTF8Type'; +EOF + +# Fill with questions +./compile-questions.sh >> $TEMPFILE + + +# Fill with videos +./compile-videos.sh >> $TEMPFILE + +# GO! +cassandra-cli < $TEMPFILE +rm $TEMPFILE -- cgit v1.2.3