Skip to content

Prettify and improve makebin debugging #428

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions usrlocalpkg/admin/makebin
Original file line number Diff line number Diff line change
Expand Up @@ -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_';
Expand All @@ -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;
Expand Down Expand Up @@ -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}) {
Expand Down