summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2016-10-26 12:58:45 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2016-10-26 15:05:52 +0200
commitde43eb36413ac4f2d4705e619c829c0f117adce7 (patch)
tree7447904c130ab53c3785bb7862292d5f5dae5241 /install
Initial commit
Diffstat (limited to 'install')
-rwxr-xr-xinstall24
1 files changed, 24 insertions, 0 deletions
diff --git a/install b/install
new file mode 100755
index 0000000..86167d2
--- /dev/null
+++ b/install
@@ -0,0 +1,24 @@
+#!/bin/bash
+# run this script as ./install as we set its working dir from $BASH_SOURCE
+cd $(dirname $BASH_SOURCE)
+
+# the path of the working dir
+BASE=$(pwd)
+
+# dotfiles to install
+for dotfile in bashrc vimrc; do
+ mkdir -pv bak
+ [ -e ~/.$dotfile ] && mv -v ~/.$dotfile bak/.$dotfile
+ ln -sfv $BASE/$dotfile ~/.$dotfile
+done
+
+# git-prompt
+if [ ! -e ~/.git-prompt.sh ]; then
+ curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
+fi
+
+# scripts
+mkdir -pv ~/bin
+for bin in $BASE/bin/*; do
+ ln -svf $bin ~/bin
+done

Contact - Imprint