-
Notifications
You must be signed in to change notification settings - Fork 9
/
bashrcsetup.sh
17 lines (17 loc) · 1.31 KB
/
bashrcsetup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
#
# DO NOT put secrets in this file!!!
echo 'echo "Setting App env variables"' >> .bashrc
echo 'echo "Changing \$HOME from $HOME to this directory: $PWD, so git push to Heroku will use the _netrc file here"' >> .bashrc
echo 'export HOME=`pwd`' >> .bashrc
echo "alias branches=\"git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'\"" >> .bashrc
echo "export NODE_ENV=\"development\"" >> .bashrc
echo "export EDITOR=\"code --wait\"" >> .bashrc
echo "export HOSTNAME=\"localhost:3011\"" >> .bashrc
echo "export BROWSER_ENV=\"NODE_ENV,HOSTNAME\"" >> .bashrc
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo "alias dbup=\"export MONGODB_URI=mongodb://localhost:27017/test?connectTimeoutMS=3000000 && sudo rm -rf tmp/db && mkdir -p tmp/db && sudo mongod --quiet --dbpath ./tmp/db --port 27017 &\"" >> .bashrc
else
echo "alias dbup=\"export MONGODB_URI=mongodb://localhost:27017/test?connectTimeoutMS=3000000 && mkdir -p tmp/db && rm -rf tmp/db/* && start /b mongod --quiet --dbpath ./tmp/db --port 27017\"" >> .bashrc
fi
echo "alias dbdown=\"mongo --eval \\\"db.getSiblingDB('admin').shutdownServer(); quit()\\\"\"" >> .bashrc