-
Notifications
You must be signed in to change notification settings - Fork 0
/
webinstall.sh
37 lines (31 loc) · 1.07 KB
/
webinstall.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
34
35
36
37
#!/bin/sh
# Install script for SOTA syntax highlighting in VIM
set -e
set -u
# Installation will put two files in place under $INSTALLDIR
# syntax/sota.vim == highlighting
# ftdetect/sota.vim == filetype detection
SOURCE=https://raw.github.com/mjwade/vim-syntax-sota/master
INSTALLDIR=$HOME/.vim
echo -e "Installing vim-syntax-simics"
# Create the needed paths and files
echo -e "\t-Making subdirs in $HOME/.vim"
mkdir -p $INSTALLDIR/syntax/
if [ $? -ne 0 ]; then #failed
EXITCODE=$?
echo "failed to mkdir -p on $INSTALLDIR/syntax/sota.vim"
exit $EXITCODE
fi
mkdir -p $INSTALLDIR/ftdetect/
if [ $? -ne 0 ]; then #failed
EXITCODE=$?
echo "failed to mkdir -p on $INSTALLDIR/ftdetect/sota.vim"
exit $EXITCODE
fi
# Fill the files
# NOTE: Assumes you're running this from the web...
echo -e "\t-Fetching the vim-sota files from the web"
curl --raw --silent $SOURCE/syntax/sota.vim > $INSTALLDIR/syntax/sota.vim
curl --raw --silent $SOURCE/ftdetect/sota.vim > $INSTALLDIR/ftdetect/sota.vim
# Stuff should be in the files now...
echo "Installation is complete. Enjoy!"