updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / vim-omnicppcomplete-stl / vim-omnicppcomplete-stl.install
blobe29e7f805f435081e52e1f175b8f07ad30aa7919
1 make_tags() {
2   _ctagsf="-R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++" 
4   if [ -z "$2" ]
5   then
6           _path="/usr/include/$1"
7   else
8           _path=$2
9   fi
10   ctags $_ctagsf -f $1.tags $_path && mkdir -p $1 && mv $1.tags $1/tags &> /dev/null
13 post_install() {
14   sed -i "/Generate by vim-omnicppcomplete-stl/d" /etc/vimrc
15   echo "set tags+=/usr/share/vim/omnitags/**1/tags \" Generate by vim-omnicppcomplete-stl " >> /etc/vimrc
16   mkdir -p "/usr/share/vim/omnitags"
17   cd "/usr/share/vim/omnitags"
18   echo "Making tags... "
20   pwd
21   make_tags CPP "/usr/share/vim/cpp_src" # for C++
22  #make_tags GL  # for OpenGL
23  #make_tags SDL # for SDL
24  #make_tags Qt  # for QT4
25 # You can add more ...
27 # build boost tags, very very slow.
28 # It request a lot of memory (at least 4G)
29 # If there is not enough memory, 
30 # system will kill that process.
31 # The tags file is hugh (at least 1G).
32  #make_tags boost 
34  #make_tags all /usr/include # LOL, Don't do this, I'm serious.
36   echo "Done."
39 post_upgrade() {
40   post_remove
41   post_install
44 post_remove() {
45   sed -i "/Generate by vim-omnicppcomplete-stl/d" /etc/vimrc
46   rm "/usr/share/vim/omnitags/" -rf