diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2013-08-31 23:39:29 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2013-08-31 23:39:29 -0700 |
commit | 5ed537a6e3f7f57bd4c97306b7b9995a677c8b7b (patch) | |
tree | 1e4e490e96a2c79559807a4452890d3d0cb36543 /devfiles/scripts/bootstrap-strings.sh | |
parent | a1dfbf19b5e88897b46f4095ff3ef730eba26ba6 (diff) |
Adding real videos
Diffstat (limited to 'devfiles/scripts/bootstrap-strings.sh')
-rwxr-xr-x | devfiles/scripts/bootstrap-strings.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/devfiles/scripts/bootstrap-strings.sh b/devfiles/scripts/bootstrap-strings.sh index 9552dcb..4e5eaf9 100755 --- a/devfiles/scripts/bootstrap-strings.sh +++ b/devfiles/scripts/bootstrap-strings.sh @@ -2,12 +2,17 @@ ## ## This script clears the strings ColumnFamily and then rebuilds it. +## If given a file name, it will put the commands into the file and not run it. ## export TOOLS=`awk -F= '/jesterpm\.buildtools\.root/ { print $2 }' $HOME/.jesterpm-build-tools.properties` -export DEVFILES=$(dirname $0) +export DEVFILES=$(dirname $0)/.. -TEMPFILE=`mktemp` +SAVEFILE="$1" +TEMPFILE="$SAVEFILE" +if [ -z "$SAVEFILE" ]; then + TEMPFILE=`mktemp` +fi cat > $TEMPFILE << EOF use GROW; @@ -21,12 +26,14 @@ create column family strings EOF # 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! -cassandra-cli < $TEMPFILE -rm $TEMPFILE +if [ -z "$SAVEFILE" ]; then + cassandra-cli < $TEMPFILE + rm $TEMPFILE +fi |