Subject: export/unset PKG_PATH: perhaps this will help someone
To: None <netbsd-users@netbsd.org>
From: paul <pkdb1@attbi.com>
List: netbsd-users
Date: 02/27/2002 14:15:24
I found I kept needing to switch back and forth between installing
from pkgsrc and using pkg_add, which requires unsetting and
setting PKG_PATH. So I am trying this as a function in my .bashrc:
it will set my PKG_PATH variable, pass the command line argument t
the real pkg_add command, and then unset PKG_PATH again.
function pkgadd {
export
PKG_PATH=ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5/i386/All
/usr/sbin/pkg_add $*
unset PKG_PATH
}
Is there an easier or smarter way to do this? I suppose if I find
myself doing this a lot, I'll need to accomodate multiple
arguments and stuff them into a for loop, but I'll build that
bridge when I get there.