Skip to content

Swarmt.sh is using it's own path, and not the calling path #3

@dduportal

Description

@dduportal

I've installed the script on my hdd, in ~/workspace/swarmt and updated my PATH to add it:
export PATH=$HOME/workspace/swarmt.

I'm now working from my project in another folder, in ~/workspace/myproject.
I've put my swarmt.conf in this project folder with this content:

project=wip
smanager=1
sworker=2
mdriver=virtualbox
mimage=https://github.com/boot2docker/boot2docker/releases/download/v17.05.0-ce/boot2docker.iso
dotoken=

When I launch the swarmt.sh init command from within this folder, it tries to start a cluster based on th swarmt.conf near the swarmt.sh command.

I know I can use the -c option, but the default behaviour can have non wanted effect.

Proposal:

  • If a swarmt.conf file is on the current folder (not near the swarmt.sh), then we use it
  • Or we use the -c option

Bash code for this, to put at the beginning

CURRENT_DIR="$(pwd -P)"

CURRENT_DIR will contain the full path to the current folder, from where the script is called.

What do you think ?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions