summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-install-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/bin/tl-update-install-pkg')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-install-pkg24
1 files changed, 13 insertions, 11 deletions
diff --git a/Master/tlpkg/bin/tl-update-install-pkg b/Master/tlpkg/bin/tl-update-install-pkg
index 24397828909..d0800750e06 100755
--- a/Master/tlpkg/bin/tl-update-install-pkg
+++ b/Master/tlpkg/bin/tl-update-install-pkg
@@ -17,7 +17,7 @@ BEGIN {
} else {
$::installerdir = '../..';
}
- chdir ($installerdir) || die "$0: chdir($installerdir) failed: $!";
+ chdir ($installerdir) || die "$prg: chdir($installerdir) failed: $!";
chomp ($installerdir = `pwd`);
unshift (@INC, "$::installerdir/tlpkg");
#
@@ -71,6 +71,8 @@ GetOptions(
usage if $opt_help;
die "$0: extra argument(s) @ARGV; try --help if you need it.\n" if @ARGV;
+my $prg = TeXLive::TLUtils::basename($0);
+
# determine directories.
my $sys_tmp = TeXLive::TLUtils::initialize_global_tmpdir()
|| die ("cannot get temporary directory");
@@ -83,7 +85,7 @@ chomp (my $YYYYMMDD = `date +%Y%m%d`);
my $install_tl_name = "install-tl-$YYYYMMDD";
my $inst_tmp = "$tmpdir/$install_tl_name";
-die "$0: output directory must be specified; try --help if you need it.\n"
+die "$prg: output directory must be specified; try --help if you need it.\n"
if ! $opt_outputdir;
my $outputdir = $opt_outputdir;
@@ -113,25 +115,25 @@ if ($opt_verbose) {
info("outputdir: \"$outputdir\"\n");
}
-die "$0: Output directory does not exist: $outputdir.\n" unless -e $outputdir;
-die "$0: $outputdir not a directory.\n" unless -d $outputdir;
-die "$0: Output directory not writable: $outputdir.\n" unless -w $outputdir;
+die "$prg: Output directory does not exist: $outputdir.\n" unless -e $outputdir;
+die "$prg: $outputdir not a directory.\n" unless -d $outputdir;
+die "$prg: Output directory not writable: $outputdir.\n" unless -w $outputdir;
# read TLPDB and extract files
my $tlpdb = TeXLive::TLPDB->new ("root" => $installerdir);
-die "$0: Cannot find tlpdb in $installerdir.\n" unless defined $tlpdb;
+die "$prg: Cannot find tlpdb in $installerdir.\n" unless defined $tlpdb;
my $tlpinst = $tlpdb->get_package("00texlive.installer");
-die "$0: no 00texlive.installer in ${installerdir}'s texlive.tlpdb"
+die "$prg: no 00texlive.installer in ${installerdir}'s texlive.tlpdb"
unless defined $tlpinst;
my $tlpinfra = $tlpdb->get_package("texlive.infra");
-die "$0: no texlive.infra in ${installerdir}'s texlive.tlpdb"
+die "$prg: no texlive.infra in ${installerdir}'s texlive.tlpdb"
unless defined $tlpinfra;
my $tlptrans = $tlpdb->get_package("texlive-msg-translations");
-die "$0: no texlive-msg-translations in ${installerdir}'s texlive.tlpdb"
+die "$prg: no texlive-msg-translations in ${installerdir}'s texlive.tlpdb"
unless defined $tlptrans;
my @unix = ();
@@ -203,7 +205,7 @@ sub copy_files {
#
sub make_zip {
my ($type) = @_;
- info ("$0: Making $type...\n");
+ info ("$prg: Making $type...\n");
chomp (my $prevdir = `pwd`);
&xchdir ($tmpdir);
@@ -233,7 +235,7 @@ sub make_zip {
#
sub install_files {
$outputdir = abs_path ($outputdir);
- info ("$0: Installing to $outputdir\n");
+ info ("$prg: Installing to $outputdir\n");
for my $f ("install-tl-unx.tar.gz", "install-tl.zip",
"install-tl-windows.exe") {
copy ("$tmpdir/$f", $outputdir);