Author: marvintriebel
Date: Fri Mar 14 13:28:52 2014
New Revision: 9246

URL: http://svn.gna.org/viewcvs/service-tech?rev=9246&view=rev
Log:
fancy front end automated creation

Added:
    trunk/_meta/live2/frontend/buildFrontend.sh   (with props)

Added: trunk/_meta/live2/frontend/buildFrontend.sh
URL: 
http://svn.gna.org/viewcvs/service-tech/trunk/_meta/live2/frontend/buildFrontend.sh?rev=9246&view=auto
==============================================================================
--- trunk/_meta/live2/frontend/buildFrontend.sh (added)
+++ trunk/_meta/live2/frontend/buildFrontend.sh Fri Mar 14 13:28:52 2014
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+SVN_FANCY="http://svn.gna.org/svn/service-tech/trunk/_meta/live2/frontend/fancy";
+SVN_BASE="http://svn.gna.org/svn/service-tech/trunk/_meta/live2/frontend";
+SVN_REL_GENERATION="/generation"
+SVN_REL_FILES="/files"
+SVN_REL_CASESTUDIES="/casestudies"
+
+## check if argument given
+if [ -z $1 ]; then
+   echo "please provide backend url (eg. 
http://turgon.informatik.hu-berlin.de:80)"
+   exit 1
+fi
+
+BACKEND=$1
+
+## subroutinge to check if a certain tool is callable
+function checkTool {
+$1 --version &> /dev/null
+if [ $? != "0" ] ; then
+    echo "$1 not available. please install $1 and try again."
+    exit 1
+fi
+}
+
+checkTool nodejs
+checkTool svn
+checkTool wget
+
+# TODO: GGO conversion foreach tool
+
+svn export $SVN_BASE$SVN_REL_GENERATION
+svn export $SVN_BASE$SVN_REL_FILES
+svn export $SVN_BASE$SVN_REL_CASESTUDIES
+svn export $SVN_FANCY
+
+FILE_DIR=$(basename "$SVN_BASE$SVN_REL_GENERATION")
+# test if directory exists
+if [ ! -d $FILE_DIR ] ; then
+    echo "directory not found. svn export failed?"
+    exit 1
+fi
+
+OUTPUT_DIR=$FILE_DIR/output
+
+mkdir $OUTPUT_DIR
+mkdir $OUTPUT_DIR/generated_files
+
+wget $BACKEND/list -O $OUTPUT_DIR/backend_list.json
+if [ $? != "0" ] ; then
+    echo "ERROR."
+    echo "an error occured when requesting: $BACKEND/list" >&2
+    exit 1
+fi
+
+
+$FILE_DIR/jsonFromFolder.sh $(basename $SVN_BASE/$SVN_REL_FILES) > 
$OUTPUT_DIR/allFiles.json
+# $FILE_DIR/jsonFromFolder.sh $SVN_REL_FILES/$SVN_REL_FILES > 
$OUTPUT_DIR/allFiles.json
+nodejs $FILE_DIR/toolFilesFromCaseStudies.js "$(basename
+$SVN_BASE/$SVN_REL_CASESTUDIES)" "$OUTPUT_DIR"
+
+mv $OUTPUT_DIR/generated_files/* $(basename "$SVN_FANCY")/generated

Propchange: trunk/_meta/live2/frontend/buildFrontend.sh
------------------------------------------------------------------------------
    svn:executable = *


-- 
You received this e-mail, because you subscribed the mailing list 
"service-tech-commits" which will forward you any e-mail addressed to 
[email protected]. If you want to unsubscribe or make any changes to 
your subscription, please go to
https://mail.gna.org/listinfo/service-tech-commits.

Reply via email to