-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·33 lines (29 loc) · 880 Bytes
/
install.sh
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
#!/usr/bin/env bash
! [ -f $HOME/.bash_profile.bak ] && \
cp $HOME/.bash_profile $HOME/.bash_profile.bak && \
echo 'Backed up bash_profile to bash_profile.bak'
rm $HOME/.bash_profile
ln -s $HOME/.dotfiles/bash_profile $HOME/.bash_profile
for file in $HOME/.dotfiles/config/*
do
basefile=`basename $file`
if [ -f "$HOME/.$basefile" ];
then
! [ -f "$HOME/.$basefile.bak" ] && \
cp "$HOME/.$basefile" "$HOME/.$basefile.bak" && \
echo "Backed up existing .$basefile to .$basefile.bak"
fi
if ! [ "$file" == '.' ] && ! [ "$file" == '..' ]; then
rm "$HOME/.$basefile"
ln -s $file "$HOME/.$basefile"
echo " - Linked $basefile"
fi
done
# install janus
if ! [ -d "$HOME/.janus/" ]; then
echo " Copying janus configs"
cp -R .janus/ $HOME/.janus/
cd "$HOME/.janus"
git submodule update --init --recursive
curl -Lo- https://bit.ly/janus-bootstrap | bash
fi