|
From: wandys <al...@so...> - 2003-09-15 20:26:50
|
Hi, all
Somebody on Linuxforum has requested a Linux/UN*X installer for our
translated doc.
I just wrote one. (tested on FreeBSD-4.8R)
------------------------------8<---------------------------------------
#!/bin/sh
VIM_PATH=`ls -d /usr/share/vim/vim* 2>/dev/null`
if [ $? = 1 ]; then
VIM_PATH=`ls -d /usr/local/share/vim/vim* 2>/dev/null`
if [ $? = 1 ]; then
echo 'Error: No vim found installed on this system'
exit 1
fi
fi
case $1 in
install)
if [ ! -d $VIM_PATH/doc.bk ]; then
mkdir $VIM_PATH/doc.bk
cp $VIM_PATH/doc/* $VIM_PATH/doc.bk
fi
cp doc/*.txt $VIM_PATH/doc
;;
uninstall)
mv $VIM_PATH/doc.bk/* $VIM_PATH/doc
rmdir $VIM_PATH/doc.bk
;;
*)
echo "Usage: $0 {install|unstall}"
exit 1
;;
esac
------------------------------8<---------------------------------------
As you can see, this script is pretty simple. It presumes vim is
installed with the prefix '/usr' or '/usr/local/' and only one version
of vim is installed. (I think this is the most common case)
I named it as 'vimcdoc.sh' and put it under the top dir 'vimcdoc-xxxx/'
to install or upgrade:
# cd vimcdoc-xxx
# ./vimcdoc install
to uninstall:
# cd vimcdoc-xxx
# ./vimcdoc uninstall
If you think it's okay, i'm proposing a 'cvs add' to the 'data/'
dir (with the 'INSTALL' file updated accordingly). And if possible, add
it to new release tarballs.
The script above is meant to make a system-wide installation.
There's also another per-user-specific way to install vimcdoc. That is
simply put all *.txt files into '~/.vim/doc/'. (this method may be
safer and more stable but only effective for one user at one
installation)
BTW, to lang2, i also wrote a new Makefile for '.txt -> .html', hoping
it's useful for updating web pages.
I committed it into the '$CVSROOT/VCD/VCD/htdocs/doc' directory for VCD
site. I think you may copy and change it to fix your need at
vimcdoc.sf.net.
Regards,
|