Skip to content

Commit

Permalink
Merge pull request #428 from mariux64/prettify-and-improve-makebin-de…
Browse files Browse the repository at this point in the history
…bugging

Prettify and improve makebin debugging
  • Loading branch information
thomas authored Dec 20, 2024
2 parents 43547b6 + deb84b6 commit 3cf55a0
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit 3cf55a0

Please sign in to comment.