diff --git a/usrlocalpkg/admin/makebin b/usrlocalpkg/admin/makebin index 9e0ef8d..0d156d4 100755 --- a/usrlocalpkg/admin/makebin +++ b/usrlocalpkg/admin/makebin @@ -4,13 +4,14 @@ use warnings; # see /usr/local/package/admin/config for further descriptions +my $MXPKG = $ENV{MAKEBIN_MXPKG} || '/etc/mxpkg'; my $CFG = $ENV{MAKEBIN_CFG} || '/usr/local/package/admin/config'; my $LIBSRC = $ENV{MAKEBIN_LIBSRC} || '/usr/local/package/admin/lib'; my $BINDIR = $ENV{MAKEBIN_BINDIR} || '/usr/local/package/bin'; my $LIBDIR = $ENV{MAKEBIN_LIBDIR} || '/usr/local/package/lib'; # files that belong to the wrapper tools and should stay in the BINDIR -my %SACROSANCT = (ptype => 1, pman => 1, prun => 1); +my %SACROSANCT = (ptype => 1, pman => 1, prun => 1); sub WRAPPER { return<<'_EOF_'; @@ -28,13 +29,13 @@ _EOF_ sub tilde_replace { my ($data,$hash)=@_; - $data =~ s/~([^~]*)~/$hash->{$1}/eg; + $data =~ s/~([^~]*)~/$hash->{$1}/eg; return $data; } sub read_mxpkg { my @ret; - open my $in,'<',"/etc/mxpkg" or die "/etc/.xmpg: $!\n"; + open my $in,'<',$MXPKG or die "$MXPKG: $!\n"; while(<$in>) { s/#.*//; /\S/ or next; @@ -250,8 +251,8 @@ sub to_varstring { } sub createWrapper { - my %firstWrapper; - my %firstWrapperInode; + my %firstWrapper; + my %firstWrapperInode; foreach my $wrapper (sort keys %hasPackage) { my $package = $hasPackage{$wrapper}; if (my $oldfile = $firstWrapper{$package}) {