Skip to content

Commit

Permalink
Using bash to run install script
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekpandey14 committed Mar 10, 2017
1 parent 7bfa23a commit 571314c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion command/install_maya.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (c *InstallMayaCommand) installMayaserver() int {

var runop int = 0

c.Cmd = exec.Command("sh", InstallMayaserverScript)
c.Cmd = exec.Command("bash", InstallMayaserverScript)

if runop = execute(c.Cmd, c.M.Ui); runop != 0 {
c.M.Ui.Error("Install failed: Error installing mayaserver")
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ cd /etc/maya.d/templates

echo "Fetching mayaserver config templates ..."
curl -sSL https://raw.githubusercontent.com/openebs/maya/master/templates/mayaserver.service.tmpl -o mayaserver.service.tmpl
curl -sSL https://raw.githubusercontent.com/openebs/maya/master/templates/nomad_global.INI.tmpl -o nomad_global.INI
curl -sSL https://raw.githubusercontent.com/openebs/maya/master/templates/nomad_global.INI.tmpl -o nomad_global.INI.tmpl

echo "Fetching consul config templates ..."
curl -sSL https://raw.githubusercontent.com/openebs/maya/master/templates/consul-server.json.tmpl -o consul-server.json.tmpl
Expand Down
4 changes: 2 additions & 2 deletions scripts/install_mayaserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -e
MAYA_VERSION="0.0.4"
CURDIR=`pwd`

if [ `mayaserver version | head -n 1 | cut -d ' ' -f 2 | sed 's/dev//' | cut -d "'" -f 2` = $MAYA_VERSION ]; then
echo "Mayaserver v$MAYA_VERSION already installed; Skipping"
if [[ $(which mayaserver >/dev/null && mayaserver version | head -n 1 | cut -d ' ' -f 2 | sed 's/dev//' | cut -d "'" -f 2) == "$MAYA_VERSION" ]]; then
echo "Mayaserver v$MAYA_VERSION already installed; Skipping"
exit
fi

Expand Down

0 comments on commit 571314c

Please sign in to comment.