-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·42 lines (34 loc) · 1.29 KB
/
update.sh
File metadata and controls
executable file
·42 lines (34 loc) · 1.29 KB
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
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Get current directory if called from elsewhere
ORIGINAL_DIR=$(pwd)
# Get directory of script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
# Warning
if [[ "$1" != "--force" ]]; then
echo -e "[!] WARNING - This script will update the project, installed plugins and color schemes."
echo -e "Type 'y' to continue."
read IN
if [ ! "$IN" = "y" ]; then
exit 0
fi
fi
# Update project and submodules
echo "[*] Updating NullMode's config ..."
git pull
echo "[*] Updating git submodules (plugins) ..."
git submodule init
git submodule update --recursive
git submodule status
# Update Pathogen
echo "[*] Updating Pathogen ..."
rm .vim/autoload/pathogen.vim
curl -s -S -o .vim/autoload/pathogen.vim https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim
# Update color schemes
echo "[*] Updating Color Schemes ..."
rm -r .vim/colors/*.vim
curl -s -S -o .vim/colors/vividchalk.vim https://raw.githubusercontent.com/tpope/vim-vividchalk/master/colors/vividchalk.vim
curl -s -S -o .vim/colors/molokai.vim https://raw.githubusercontent.com/tomasr/molokai/master/colors/molokai.vim
curl -s -S -o .vim/colors/flatcolor.vim https://raw.githubusercontent.com/MaxSt/FlatColor/master/colors/flatcolor.vim
# Go back to original DIR
cd $ORIGINAL_DIR