1
0
Fork 0
mirror of https://github.com/sbrl/bin.git synced 2018-01-10 21:33:46 +00:00
bin/envsetup

35 lines
1.1 KiB
Text
Raw Permalink Normal View History

2016-03-23 20:50:35 +00:00
#!/usr/bin/env bash
BIN_DIR=$(pwd)
# Backup the existing bashrc and bash aliases
mv ~/.bashrc ~/.bashrc.bak
mv ~/.bash_aliases ~/.bash_aliases.bak
2018-01-06 19:43:55 +00:00
mv ~/.bash_profile ~/.bash_profile.bak
2016-09-12 20:06:45 +00:00
mv ~/.hh_favourites ~/.hh_favourites.bak
2018-01-03 22:40:15 +00:00
mv ~/.nanorc ~/.nanorc.bak
2016-03-23 20:50:35 +00:00
# Link to the new ones
ln -s ${BIN_DIR}/.bashrc ~/.bashrc
ln -s ${BIN_DIR}/.bash_aliases ~/.bash_aliases
2018-01-06 19:43:55 +00:00
ln -s ${BIN_DIR}/.bash_profile ~/.bash_profile
2017-01-14 15:38:16 +00:00
ln -s ${BIN_DIR}/.hh_favorites ~/.hh_favorites
2018-01-03 22:40:15 +00:00
ln -s ${BIN_DIR}/.nanorc ~/.nanorc
2016-03-23 20:50:35 +00:00
# Copy the bash host file into place
cp ${BIN_DIR}/.bash_host ~
2016-09-12 20:05:02 +00:00
# Set up git
## Adopt the 'new' merging behaviour
git config --global push.default simple
2017-01-14 15:38:16 +00:00
## Set the username & email address
git config --global user.name "Starbeamrainbowlabs"
git config --global user.email "sbrl@starbeamrainbowlabs.com"
2017-11-23 15:22:17 +00:00
## Autosign commits with GPG
git config --global commit.gpgsign true
# If we've got a display, then set up meld too
if [[ "$DISPLAY" != "" ]]; then
git config --global merge.tool meld
fi
2016-09-12 20:05:02 +00:00
## Add gitignore.io .gitignore file generator
git config --global alias.ignore '!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi'