Changeset 797


Ignore:
Timestamp:
11/03/20 15:38:37 (4 years ago)
Author:
Kris Deugau
Message:

/trunk

Clean up a lingering nuisance with Perl's default include path; all scripts
should now run correctly no matter what the caller's current directory.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r771 r797  
    100100        @mkdir -p $(DESTDIR)${datadir}/$(PKG_LEAF)/templates
    101101        @$(INSTALL_DATA) $(TEMPLATES) $(DESTDIR)${datadir}/$(PKG_LEAF)/templates
    102         @# munge in necessary 'use lib ...' bits so scripts can find libs and config...
    103         @# datadir is correct;  no arch-specific files
    104102        @for i in $(SCRIPTS) $(MODULES); do \
    105103                $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${datadir}/$(PKG_LEAF)/$$i ; \
    106                 perl -pi -e "s|use lib '.';\s+##uselib##|use lib '${datadir}/$(PKG_LEAF)/';|;" $(DESTDIR)${datadir}/$(PKG_LEAF)/$$i ; \
    107104        done
    108105        @$(INSTALL) -d $(DESTDIR)${sysconfdir}/$(CFG_LEAF)/
  • trunk/compact-recs.pl

    r786 r797  
    44##
    55# $Id$
    6 # Copyright 2013,2014,2018 Kris Deugau <kdeugau@deepnet.cx>
     6# Copyright 2013,2014,2018,2020 Kris Deugau <kdeugau@deepnet.cx>
    77#
    88#    This program is free software: you can redistribute it and/or modify
     
    2323use warnings;
    2424
    25 use lib '.';    ##uselib##
     25# push "the directory the script is in" into @INC
     26use FindBin;
     27use lib "$FindBin::RealBin/";
     28
    2629use DNSDB;
    2730
  • trunk/dns-rpc.cgi

    r794 r797  
    33##
    44# $Id$
    5 # Copyright 2012-2016 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2012-2016,2020 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    2222use warnings;
    2323
    24 # don't remove!  required for GNU/FHS-ish install from tarball
    25 use lib '.';    ##uselib##
     24# push "the directory the script is in" into @INC
     25use FindBin;
     26use lib "$FindBin::RealBin/";
     27
    2628use DNSDB;
    2729
  • trunk/dns.cgi

    r788 r797  
    33##
    44# $Id$
    5 # Copyright 2008-2019 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2008-2020 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    4141#die "argh! \@INC got tainted!" if is_tainted(@INC);
    4242
    43 # don't remove!  required for GNU/FHS-ish install from tarball
    44 use lib '.';    ##uselib##
     43# push "the directory the script is in" into @INC
     44use FindBin;
     45use lib "$FindBin::RealBin/";
    4546
    4647use DNSDB;
  • trunk/export.pl

    r581 r797  
    2222use warnings;
    2323
    24 # don't remove!  required for GNU/FHS-ish install from tarball
    25 use lib '.';    ##uselib##
     24# push "the directory the script is in" into @INC
     25use FindBin;
     26use lib "$FindBin::RealBin/";
    2627
    2728use DNSDB;
  • trunk/mergerecs

    r786 r797  
    33##
    44# $Id$
    5 # Copyright 2014,2016,2018 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2014,2016,2018,2020 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    2727use Data::Dumper;
    2828
    29 # don't remove!  required for GNU/FHS-ish install from tarball
    30 use lib '.';    ##uselib##
     29# push "the directory the script is in" into @INC
     30use FindBin;
     31use lib "$FindBin::RealBin/";
    3132
    3233use DNSDB;
  • trunk/textrecs.cgi

    r745 r797  
    33##
    44# $Id$
    5 # Copyright 2012-2014 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2012-2014,2020 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    2828use DBI;
    2929
    30 # don't remove!  required for GNU/FHS-ish install from tarball
    31 use lib '.';    ##uselib##
     30# push "the directory the script is in" into @INC
     31use FindBin;
     32use lib "$FindBin::RealBin/";
    3233
    3334use DNSDB;
  • trunk/tiny-import.pl

    r791 r797  
    33##
    44# $Id$
    5 # Copyright 2012-2014 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2012-2014,2020 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    2828use Time::TAI64 qw(:tai);
    2929
    30 use lib '.';    ##uselib##
     30# push "the directory the script is in" into @INC
     31use FindBin;
     32use lib "$FindBin::RealBin/";
     33
    3134use DNSDB;
    3235
  • trunk/vega-import.pl

    r496 r797  
    33##
    44# $Id$
    5 # Copyright 2011-2013 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2011-2013,2020 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    2828use DBI;
    2929use Data::Dumper;
     30
     31# push "the directory the script is in" into @INC
     32use FindBin;
     33use lib "$FindBin::RealBin/";
    3034
    3135use DNSDB;
Note: See TracChangeset for help on using the changeset viewer.