From 408553e471eb3cc4cc894fc3f551d629bddaee3c Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Wed, 31 Dec 2003 23:48:05 +0000 Subject: [PATCH] - FreeBSD portinstall fix from Jean-Baptiste Quenot --- bash_completion | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bash_completion b/bash_completion index a0fc3103..96e08d9f 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # bash_completion - some programmable completion functions for bash 2.05b # -# $Id: bash_completion,v 1.667 2003/12/24 23:19:13 ianmacd Exp $ +# $Id: bash_completion,v 1.668 2004/01/01 00:48:05 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -4429,8 +4429,9 @@ _portinstall() prev=${COMP_WORDS[COMP_CWORD-1]} # First try INDEX-5 indexfile=$portsdir/INDEX-5 - # Then INDEX - test -f $indexfile || indexfile=$portsdir/INDEX + # Then INDEX if INDEX-5 does not exist or system is not FreeBSD 5.x + [ "${OSTYPE%.*}" = "freebsd5" -a -f $indexfile ] || + indexfile=$portsdir/INDEX [ "$prev" = "-l" -o "$prev" = "-L" -o "$prev" = "-o" ] && return 0