summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-04-21 13:54:52 +0300
committerLV-426 <lv-426@taproot.org.il>2015-04-21 13:54:52 +0300
commit31478c0f18c16e036a9ef8be0a1eb880bc94058e (patch)
tree9c5a2e32e3a9db08f4d6ec503c7fabcc285eb0a5 /tools
parent8e14485a55ef0e4075735b7d190b29703f75b58f (diff)
refactoring tools/ contents to more appropriate places
Diffstat (limited to 'tools')
-rw-r--r--tools/deliverables_generator.js41
-rw-r--r--tools/utils.sh27
2 files changed, 0 insertions, 68 deletions
diff --git a/tools/deliverables_generator.js b/tools/deliverables_generator.js
deleted file mode 100644
index c4454609..00000000
--- a/tools/deliverables_generator.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var fs = require('fs');
-
-function randomDate(start, end) {
- return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()));
-}
-
-function deliverableTest() {
- links=[];
- nodes=[];
- var status = "unknown";
- var nodecounter = 150;
-
- var addLink = function (source, target, name) {
- links.push({source:source, target:target, name:name});
- };
-
- for (var i = 0; i < nodecounter; i++) {
- if (Math.random() > 0.7) status = "done";
- else if (Math.random() > 0.5) status = "current";
- else status = "waiting";
- var end = randomDate(new Date(), new Date("01/01/2018"));
- var start = randomDate(new Date(), end);
- nodes.push({id:"Task " + i, name: "Task " + i,
- type:"deliverable", start:start, end:end,
- status:'status'});
- }
-
- for (var i = 0; i < nodecounter; i++) {
- var endindex = Math.floor(Math.random() * nodecounter);
- var startindex = Math.floor(Math.random() * nodecounter);
- if (nodes[endindex].start > nodes[startindex].start && startindex !== endindex) {
- addLink("Task " + startindex, "Task " + endindex, "depends on", "perm");
- } else {
- addLink("Task " + endindex, "Task " + startindex, "depends on", "perm");
- }
- }
-
- return {nodes:nodes, links:links};
-}
-
-fs.writeFileSync('deliverables.json', JSON.stringify(deliverableTest()));
diff --git a/tools/utils.sh b/tools/utils.sh
deleted file mode 100644
index df5e2fb6..00000000
--- a/tools/utils.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-# utilities to be sourced for rhizi bash scripts
-
-if [ "x$NEO4J_ROOT" == "x" ]; then
- NEO4J_SHELL=`which neo4j-shell`
- if [ "x$NEO4J_SHELL" == "x" ]; then
- echo missing neo4j-shell, please define NEO4J_ROOT or place neo4j-shell in PATH
- exit 1
- fi
-else
- NEO4J_SHELL="$NEO4J_ROOT/bin/neo4j-shell"
- if [ ! -e $NEO4J_SHELL ]; then
- echo "\$NEO4J_ROOT/bin/neo4j-shell does not exist, fix NEO4J_ROOT"
- exit 1
- fi
-fi
-
-function quit_if_no_neo4j_running () {
- if [ `uname` == "Darwin" ]; then
- neo4j_count=`netstat -na -ptcp 2>/dev/null | grep 7474 | wc -l`
- else
- neo4j_count=`netstat -ltnop 2>/dev/null | grep 7474 | wc -l`
- fi
- if [ $neo4j_count == "0" ]; then
- echo run neo4j please
- exit 0
- fi
-}