forked from cep21/jackbash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_bashrc
More file actions
executable file
·32 lines (26 loc) · 818 Bytes
/
install_bashrc
File metadata and controls
executable file
·32 lines (26 loc) · 818 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
#!/bin/bash
# Install script for .bashrc settings
INSTALL_DIR="$HOME/.bash"
if [ -d $INSTALL_DIR ]; then
echo "Looks like you have a $INSTALL_DIR directory installed. Good job!"
exit
fi;
git clone git://github.com/cep21/jackbash.git $INSTALL_DIR
for x in $HOME/.bashrc $HOME/.profile $HOME/.bash_profile ; do
if [ -e $x ]; then
mv $x "$x"_backup
fi;
echo "source $INSTALL_DIR/bashrc" > $x
done
if [ ! -e $HOME/.gitconfig ]; then
# Copy because you have to fill in your user name
cp $INSTALL_DIR/config/.gitconfig $HOME/.gitconfig
fi;
if [ -e $HOME/.screenrc ]; then
mv $HOME/.screenrc $HOME/.screenrc_backup
fi;
ln -s $INSTALL_DIR/config/.screenrc $HOME/.screenrc
if [ -e $HOME/.inputrc ]; then
mv $HOME/.inputrc $HOME/.inputrc_backup
fi;
ln -s $INSTALL_DIR/config/.inputrc $HOME/.inputrc