summaryrefslogtreecommitdiff
path: root/support/vim/install.sh
blob: 9e0538477fc65dc7a834f16f39928d8fea5c621e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

for type in {ftdetect,ftplugin,syntax}/taf.vim; do
	if [[ ! -e $type ]]; then
		echo "You don't seem to be in the right directory."
		echo "Run this from libbu++/support/vim"
		exit
	fi
done

if [[ $(whoami) != "root" ]]; then
	echo You should probably run this as root...
	exit
fi

for type in ftdetect ftplugin syntax; do
	for dest in /usr/share/vim/vim*; do
		if [[ ! -d $dest/$type ]]; then mkdir -v $dest/$type; fi
		if [[ -e $dest/$type/taf.vim ]]; then rm -v $dest/$type/taf.vim; fi
		cp -v $type/taf.vim $dest/$type
	done
done