-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
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.conffile is on the current folder (not near theswarmt.sh), then we use it - Or we use the
-coption
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 ?