-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·34 lines (28 loc) · 863 Bytes
/
init.sh
File metadata and controls
executable file
·34 lines (28 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /bin/bash
DIR=`pwd`
# archive old configs in a new directory for safekeeping
mkdir -p ~/config_archive
for FILE in .gitignore .gitconfig .bash_profile .bashrc .vimrc .zshrc
do
touch $FILE
ls ~/config_archive >> $FILE
done
# warn about zsh and ohmyzsh if not installed
if ! [[ -f "~/.zsh_history" ]]; then
echo "WARNING: Zsh not installed."
fi
if ! [[ -f "~/.oh-my-zsh" ]]; then
echo "WARNING: ohmyzsh not installed."
# ln -sf $DIR/bash/profile ~/.bash_profile
# source ~/.bash_profile
else
# if zsh and ohmyzsh installed, run setup.
ln -sf $DIR/zsh/zshrc ~/.zshrc
source ~/.zshrc
fi
# create symlinks
# NOTE--should update this and turn it into a loop
ln -sf $DIR/git/gitconfig ~/.gitconfig
ln -sf $DIR/git/gitignore ~/.gitignore
ln -sf $DIR/vim/vimrc ~/.vimrc
ln -sf $DIR/bash/bash-aliases ~/.bash_aliases