diff options
author | Karl Berry <karl@freefriends.org> | 2008-07-07 18:48:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-07-07 18:48:29 +0000 |
commit | 34aa92cf74851ea38a18962dd8a2b37ec92c005b (patch) | |
tree | ff5f427e46e18abd8d9e715f5e1956fe89d084d2 /Master | |
parent | faf972d4c4eb313ce6219588269f9f6682184e72 (diff) |
doc/message changes.
git-svn-id: svn://tug.org/texlive/trunk@9341 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-install-pkg | 42 |
1 files changed, 21 insertions, 21 deletions
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); |