diff --git a/.gitignore b/.gitignore index 21ff5ce..8e9da70 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ npm-debug.log* # Mac .DS_Store -dist \ No newline at end of file +dist +.convector-dev-env \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bc41748..f7d5679 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@worldsibu/insitor", - "version": "0.1.0", + "version": "0.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/scripts/clean.sh b/scripts/clean.sh index 44cc913..c08e91b 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -1,4 +1,5 @@ #!/bin/bash +ROOT_DIR=$1 CONVECTOR_DIR="${CONVECTOR_DIR:-$PWD/.convector-dev-env}" docker rm -f $(docker ps -a | awk '$2~/hyperledger/ {print $1}') $(docker ps -a | awk '{ print $1,$2 }' | grep dev-peer | awk '{print $1 }') || true diff --git a/scripts/generate.sh b/scripts/generate.sh index 93c69ce..123bc64 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -1,5 +1,5 @@ #!/bin/bash -ROOT_DIR=$(dirname "${0}")/.. +ROOT_DIR=$1 BIN=$ROOT_DIR/bin CONFIG=$ROOT_DIR/config NETWORK_OBJECTS=$ROOT_DIR/network-objects diff --git a/scripts/init.sh b/scripts/init.sh index 226411a..27877e0 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -1,5 +1,5 @@ #!/bin/bash -ROOT_DIR=$(dirname "${0}")/.. +ROOT_DIR=$1 USERS=3 CONVECTOR_DIR="${CONVECTOR_DIR:-$PWD/.convector-dev-env}" CONVECTOR_CONFIG="${CONVECTOR_CONFIG:-$CONVECTOR_DIR/examples}" diff --git a/scripts/restart.sh b/scripts/restart.sh index 2a8271c..a518169 100755 --- a/scripts/restart.sh +++ b/scripts/restart.sh @@ -1,7 +1,7 @@ #!/bin/bash -ROOT_DIR='..' +ROOT_DIR=<%= path %> -<%= path %>/scripts/stop.sh -<%= path %>/scripts/clean.sh -<%= path %>/scripts/start.sh -<%= path %>/scripts/init.sh +$ROOT_DIR/scripts/stop.sh $ROOT_DIR +$ROOT_DIR/scripts/clean.sh $ROOT_DIR +$ROOT_DIR/scripts/start.sh $ROOT_DIR +$ROOT_DIR/scripts/init.sh $ROOT_DIR diff --git a/scripts/start.sh b/scripts/start.sh index 7dd79da..104bdf9 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,5 +1,5 @@ #!/bin/bash -ROOT_DIR=$(dirname "${0}")/.. +ROOT_DIR=$1 COMPOSE_PROJECT_NAME=net FABRIC_VERSION=x86_64-1.1.0 THIRDPARTY_VERSION=x86_64-0.4.6 \ docker-compose -f $ROOT_DIR/docker-compose.yml up -d diff --git a/scripts/stop.sh b/scripts/stop.sh index 2d5e0b8..3097ebd 100755 --- a/scripts/stop.sh +++ b/scripts/stop.sh @@ -1,5 +1,5 @@ #!/bin/bash -ROOT_DIR=$(dirname "${0}")/.. +ROOT_DIR=$1 COMPOSE_PROJECT_NAME=net \ docker-compose -f $ROOT_DIR/docker-compose.yml down