[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vim RC bug #133314: question on postinst file



On Sat, Feb 16, 2002 at 09:47:47PM -0700, Jon Franklin wrote:
> update_alt() {
>   buffer=`tempfile`
>   for i in vi view ex editor ; do
> -    update-alternatives --display $i > $buffer
> -    if ! grep -q '^\(vim\|/usr/man\)' $buffer; then
>       update-alternatives --install /usr/bin/$i $i /usr/bin/vim 120 \
>                         --slave /usr/share/man/man1/$i.1.gz $i.1.gz \
>                         /usr/share/man/man1/vim.1.gz
>     fi
>   done
>   rm -f $buffer
> }

I'd agree, assuming there isn't a good reason this test was done to begin
with.  (The tempfile would go away, too.)

Otherwise, why not:

  if ! (update-alternatives --display ex) | grep -q '(RE)' then

(fixing the RE to whatever it was supposed to do.)  This would fix the
actual RC bug and get rid of the tempfile in the progress.

-- 
Glenn Maynard



Reply to: