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, |
From: wandys <al...@so...> - 2003-09-15 20:50:45
|
On Tue, 16 Sep 2003 04:26:02 +0800 wandys <al...@so...> wrote: > echo "Usage: $0 {install|unstall}" s/unstall/uninstall/ > VCD site. I think you may copy and change it to fix your need at s/fix/fit/ Apology for these typos.. Dizzy now...it's about 5:am...seems I gotta sleep. :-) |
From: wandys <al...@so...> - 2003-09-15 20:59:19
|
On Tue, 16 Sep 2003 04:26:02 +0800 wandys <al...@so...> wrote: > # ./vimcdoc install > # ./vimcdoc uninstall s/vimcdoc/vimcdoc.sh/ |
From: Simon L. <wzh...@sp...> - 2003-09-16 09:08:35
|
wandys, On Tue, 16 Sep 2003 04:26:02 +0800, "wandys" <al...@so...> said: > 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) Well done. I will take a look tonight. lang2 -- Simon Liang wzh...@sp... -- http://www.fastmail.fm - IMAP accessible web-mail |
From: Simon L. <wzh...@sp...> - 2003-09-16 21:43:13
|
wandsy, Great. That works well for me. I just made some small changes (hopefully improvements) to it. See below: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #!/bin/sh # vimcdoc.sh: vimcdoc Linux install/uninstall script # # Usage: 'vimcdoc.sh install' to install vimcdoc # 'vimcdoc.sh uninstall' to uninstall vimcdoc # # Author: wandys (wa...@us...) ####################################################### vim --cmd ":exec 'normal i' . \$VIMRUNTIME | wq! vimrt.$$" 2> /dev/null if [ -e vimrt.$$ ]; then VIM_PATH=`cat vimrt.$$` rm vimrt.$$ else echo 'Error: No vim found on this system.' exit 1 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 -r doc/* $VIM_PATH/doc echo 'Done.' ;; uninstall) mv $VIM_PATH/doc.bk/* $VIM_PATH/doc rmdir $VIM_PATH/doc.bk rm -rf $VIM_PATH/doc/CVS echo 'Done.' ;; *) echo "Usage: $0 {install|unstall}" exit 1 ;; esac ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The way of telling what $VIMRUNTIME is has been changed. I think this is better and more "vimmy" :-) The installation now includes the 'CVS' directory to tell 'cp' to shut up, but more to allow user to update their documents easily. So if you can review the modification and give it a try on BSD and see it works, you can check it in into /data directory. I've prepared new INSTALL, README docs so that we can make another small release - 0.3.6 in no time. Cheeres, lang2 -- Simon Liang wzh...@sp... -- http://www.fastmail.fm - Faster than the air-speed velocity of an unladen european swallow |
From: Simon L. <wzh...@sp...> - 2003-09-17 10:23:26
|
Hi wandys, I actually looked at it last night and made several small changes. After that I posted my changes to the ML but somehow it was lost :( And I don't have it here with me right now. Anyways, it was good. The change I made were: 1. use=20 vim --cmd ":exec 'normal i' . \$VIMRUNTIME | wq! vimrt.$$" 2> /dev/null for getting the value of $VIMRUNTIME. 2. use 'cp -r' when installing for a) keeping cp slient, and b)=20 allowing user to do 'cvs update'. Feel free to check it in. We can always change it later. Thanks, lang2 --=20 Simon Liang wzh...@sp... --=20 http://www.fastmail.fm - And now for something completely different=85 |