From 34aa92cf74851ea38a18962dd8a2b37ec92c005b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 7 Jul 2008 18:48:29 +0000 Subject: doc/message changes. git-svn-id: svn://tug.org/texlive/trunk@9341 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/tl-update-install-pkg | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'Master/tlpkg/bin/tl-update-install-pkg') diff --git a/Master/tlpkg/bin/tl-update-install-pkg b/Master/tlpkg/bin/tl-update-install-pkg index 44b1e38f1b5..9d6e3ad8bdd 100755 --- a/Master/tlpkg/bin/tl-update-install-pkg +++ b/Master/tlpkg/bin/tl-update-install-pkg @@ -32,22 +32,20 @@ $Getopt::Long::autoabbrev=0; $opt_help=0; $opt_verbose=0; -$opt_outputdir=0; sub usage { print <<'EOF'; -Usage: - tl-make-install-pkg [-h|--help] [-v|--verbose] -o|--outputdir=dir +Usage: tl-make-install-pkg [-h|--help] [-v|--verbose] -o|--outputdir=DIR - tl-make-install-pkg generates a .tar.gz file for Unix and a .zip file - for all systems containing all the files needed to install TeX Live - from the network. +tl-make-install-pkg generates a .tar.gz file for Unix and a .zip file +for all systems containing all the files needed to install TeX Live +from the network. - Options: - -h|--help Print this message. - -o|--outputdir Target directory. Must exist and be writable. - -v|--verbose Extra messages. +Options: + -h|--help Print this message and exit. + -o|--outputdir Target directory. Must exist and be writable. + -v|--verbose Extra messages. EOF ; exit 0; @@ -62,16 +60,18 @@ GetOptions( "help|h") or usage; usage if $opt_help; +die "$0: extra argument(s) @ARGV; try --help if you need it.\n" if @ARGV; -### determine directories. - -my $sys_tmp=get_system_tmpdir or die "No system TMPDIR found."; +# determine directories. +my $sys_tmp=get_system_tmpdir or die "no system TMPDIR found"; my $tmpdir="$sys_tmp/install-tl-$$"; my $inst_tmp="$sys_tmp/install-tl-$$/install-tl"; -my $outputdir="$opt_outputdir"; -$outputdir="$thisdir/$outputdir" unless ($outputdir=~m!^/!); -### cleanup. +die "$0: the output directory must be specified; try --help if you need it.\n" + if ! $opt_outputdir; +my $outputdir = $opt_outputdir; + +# cleanup. my @signals=qw(HUP INT ILL FPE SEGV TERM ABRT QUIT BUS PIPE); @@ -85,9 +85,9 @@ foreach my $signal (@signals) { $SIG{"$signal"}=\&cleanup; } -### create directories. +# create directories. -die "$tmpdir already exists.\n" if (-d "$tmpdir"); +die "$tmpdir already exists" if -d $tmpdir; mkdir "$tmpdir" or die "Can't mkdir \"$tmpdir\".\n"; mkdir "$inst_tmp" or die "Can't mkdir \"$inst_tmp\".\n"; @@ -101,10 +101,10 @@ if ($opt_verbose) { info("outputdir: \"$outputdir\"\n"); } -die "outputdir \"$outputdir\" dosn't exist.\n" unless (-d "$outputdir"); -die "outputdir \"$outputdir\" is not writable.\n" unless (-w "$outputdir"); +die "$0: Output directory does not exist: $outputdir.\n" unless -d $outputdir; +die "$0: Output directory not writable: $outputdir.\n" unless -w $outputdir; -### read TLPDB and extract files +# read TLPDB and extract files my $tlpdb = TeXLive::TLPDB->new ("root" => "$installerdir"); die("Cannot find tlpdb in $installerdir!\n") unless defined($tlpdb); -- cgit v1.2.3