|
|
|
@ -11,6 +11,8 @@ REMOTE_IMAGE_NAME=mazzolino/twister
@@ -11,6 +11,8 @@ REMOTE_IMAGE_NAME=mazzolino/twister
|
|
|
|
|
|
|
|
|
|
set -e |
|
|
|
|
|
|
|
|
|
shift |
|
|
|
|
|
|
|
|
|
case $ACTION in |
|
|
|
|
|
|
|
|
|
build) |
|
|
|
@ -20,12 +22,13 @@ build)
@@ -20,12 +22,13 @@ build)
|
|
|
|
|
|
|
|
|
|
run) |
|
|
|
|
if [ $MODE == "--remote" ]; then |
|
|
|
|
shift |
|
|
|
|
IMAGE_NAME=$REMOTE_IMAGE_NAME |
|
|
|
|
echo Pulling new version of $IMAGE_NAME |
|
|
|
|
docker pull $IMAGE_NAME |
|
|
|
|
fi |
|
|
|
|
echo Running $IMAGE_NAME |
|
|
|
|
docker run -d -p 28332:28332 -v $HOME/.twister:/root/.twister $IMAGE_NAME |
|
|
|
|
docker run -d -p 28332:28332 -v $HOME/.twister:/root/.twister $IMAGE_NAME "$@" |
|
|
|
|
echo Twister should now be running at http://localhost:28332 |
|
|
|
|
;; |
|
|
|
|
|
|
|
|
@ -40,10 +43,10 @@ stop)
@@ -40,10 +43,10 @@ stop)
|
|
|
|
|
|
|
|
|
|
*) |
|
|
|
|
echo Usage: |
|
|
|
|
echo " $0 run" |
|
|
|
|
echo " $0 run [ARGS FOR TWISTERD..]" |
|
|
|
|
echo " Run twister from a local docker build (default)" |
|
|
|
|
echo |
|
|
|
|
echo " $0 run --remote" |
|
|
|
|
echo " $0 run --remote [ARGS FOR TWISTERD..]" |
|
|
|
|
echo " Run twister from the remote docker build at \"$REMOTE_IMAGE_NAME\"" |
|
|
|
|
echo |
|
|
|
|
echo " $0 build" |
|
|
|
|