tech-pkg archive

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

Quick and dirty hack for PKGBASE



Hi,

I need to determine the PKGBASE for a bunch of full package names without doing a 'make show-var VARNAME=PKGBASE' for every one.

Is following safe:

$pkg = "xmlcatmgr-2.2nb1";
$loc = rindex($pkg, "-");
$base = substr($pkg, 0, $loc);
print "$base\n";

thanks,

adrian.


Home | Main Index | Thread Index | Old Index