Replaced -o flag with -c flag to only sync config files if -c is passed
This commit is contained in:
parent
cdc43ca60f
commit
7a6b5633d0
23
sync.sh
23
sync.sh
@ -1,13 +1,5 @@
|
||||
rm ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.gitignore_global ~/.bashrc
|
||||
ln -s ${PWD}/gitignore_global ~/.gitignore_global
|
||||
ln -s ${PWD}/vimrc ~/.vimrc
|
||||
ln -s ${PWD}/vimperatorrc ~/.vimperatorrc
|
||||
ln -s ${PWD}/gitconfig ~/.gitconfig
|
||||
ln -s ${PWD}/bashrc ~/.bashrc
|
||||
while getopts ":bsdto" VALUE "$@"; do
|
||||
echo "Processing flag: $VALUE"
|
||||
while getopts ":bsdtc" VALUE "$@"; do
|
||||
if [ "$VALUE" = "b" ] ; then
|
||||
#Install vim bundles
|
||||
mkdir -p ~/.vim/plugin/
|
||||
mkdir -p ~/.vim/backup/
|
||||
mkdir -p ~/.vim/undo/
|
||||
@ -39,12 +31,17 @@ while getopts ":bsdto" VALUE "$@"; do
|
||||
fi
|
||||
if [ "$VALUE" = "t" ] ; then
|
||||
echo "Syncing tmux"
|
||||
trash ~/.tmux.conf
|
||||
rm ~/.tmux.conf
|
||||
ln -s ${PWD}/tmux.conf ~/.tmux.conf
|
||||
fi
|
||||
if [ "$VALUE" = "o" ] ; then
|
||||
echo "Exiting because of -o flag"
|
||||
exit 0
|
||||
if [ "$VALUE" = "c" ] ; then
|
||||
echo "Syncing config files"
|
||||
rm ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.gitignore_global ~/.bashrc
|
||||
ln -s ${PWD}/gitignore_global ~/.gitignore_global
|
||||
ln -s ${PWD}/vimrc ~/.vimrc
|
||||
ln -s ${PWD}/vimperatorrc ~/.vimperatorrc
|
||||
ln -s ${PWD}/gitconfig ~/.gitconfig
|
||||
ln -s ${PWD}/bashrc ~/.bashrc
|
||||
fi
|
||||
done
|
||||
echo "Done syncing"
|
||||
|
Loading…
x
Reference in New Issue
Block a user