mirror of
https://github.com/sbrl/bin.git
synced 2018-01-10 21:33:46 +00:00
34 lines
1.1 KiB
Bash
Executable file
34 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
BIN_DIR=$(pwd)
|
|
|
|
# Backup the existing bashrc and bash aliases
|
|
mv ~/.bashrc ~/.bashrc.bak
|
|
mv ~/.bash_aliases ~/.bash_aliases.bak
|
|
mv ~/.bash_profile ~/.bash_profile.bak
|
|
mv ~/.hh_favourites ~/.hh_favourites.bak
|
|
mv ~/.nanorc ~/.nanorc.bak
|
|
# Link to the new ones
|
|
ln -s ${BIN_DIR}/.bashrc ~/.bashrc
|
|
ln -s ${BIN_DIR}/.bash_aliases ~/.bash_aliases
|
|
ln -s ${BIN_DIR}/.bash_profile ~/.bash_profile
|
|
ln -s ${BIN_DIR}/.hh_favorites ~/.hh_favorites
|
|
ln -s ${BIN_DIR}/.nanorc ~/.nanorc
|
|
# Copy the bash host file into place
|
|
cp ${BIN_DIR}/.bash_host ~
|
|
|
|
# Set up git
|
|
## Adopt the 'new' merging behaviour
|
|
git config --global push.default simple
|
|
## Set the username & email address
|
|
git config --global user.name "Starbeamrainbowlabs"
|
|
git config --global user.email "sbrl@starbeamrainbowlabs.com"
|
|
## 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
|
|
|
|
## Add gitignore.io .gitignore file generator
|
|
git config --global alias.ignore '!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi'
|