summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-install-pkg
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-19 22:46:02 +0000
committerKarl Berry <karl@freefriends.org>2013-03-19 22:46:02 +0000
commit68dffa17a92352655e02a75df8023da14932ac97 (patch)
tree0e84afa7471e2b95584b96da5addfb00dfeab65b /Master/tlpkg/bin/tl-update-install-pkg
parent0edafd76969b5b7fe4ffdc756947598312974038 (diff)
typo fix, more error checking.
git-svn-id: svn://tug.org/texlive/trunk@29436 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-install-pkg')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-install-pkg34
1 files changed, 19 insertions, 15 deletions
diff --git a/Master/tlpkg/bin/tl-update-install-pkg b/Master/tlpkg/bin/tl-update-install-pkg
index d8b8aa5ed2c..cf6161d354e 100755
--- a/Master/tlpkg/bin/tl-update-install-pkg
+++ b/Master/tlpkg/bin/tl-update-install-pkg
@@ -37,14 +37,14 @@ $opt_help = 0;
$opt_verbose = 0;
$opt_texlivedocs = 0;
-sub usage
-{
+sub usage {
print <<'EOF';
Usage: $0 [-h|--help] [-v|--verbose] -o|--outputdir=DIR
-Generate 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.
-An existing directory must be specified as the output location.
+Generate a .tar.gz file for Unix, a .exe for Windows, and a .zip file
+for all systems containing all the files needed to install TeX Live from
+the network. An existing directory must be specified as the output
+location.
Options:
-h, --help Print this message and exit.
@@ -171,7 +171,7 @@ make_zip ("tgz");
copy_files (@win32);
make_zip ("zip");
-make_zip ("nsis");
+#make_zip ("nsis");
install_files ();
@@ -191,6 +191,8 @@ sub copy_files {
($dir, $file) = /^(.*)\/(.*)/;
mkdirhier ("$inst_tmp/$dir");
copy ($_, "$inst_tmp/$dir");
+ -r "$inst_tmp/$dir/$file"
+ || die "copy of $_ to $inst_tmp/$dir failed (cwd=$ENV{PWD})";
}
}
@@ -201,24 +203,26 @@ sub make_zip {
my ($type) = @_;
info ("$0: Making $type...\n");
- chdir ($tmpdir) || die "chdir($tmpdir) failed: $!";
+ chomp (my $prevdir = `pwd`);
+ &xchdir ($tmpdir);
if ($type eq 'zip') {
- system ('zip', '-rq', 'install-tl.zip', $install_tl_name);
+ &xsystem ('zip', '-rq', 'install-tl.zip', $install_tl_name);
} elsif ($type eq 'nsis') {
# write include file for dated install directory.
my $nsh = "$tmpdir/tlsubdir.nsh";
- system ("echo !define YYYYMMDD '$YYYYMMDD' >\"$nsh\"");
- system ("echo !define INST_TL_NAME '$install_tl_name' >>\"$nsh\"");
+ system ("echo !define YYYYMMDD '$YYYYMMDD' >$nsh");
+ system ("echo !define INST_TL_NAME '$install_tl_name' >>$nsh");
copy ("$::installerdir/tlpkg/libexec/install-tl.nsi", $tmpdir);
- system ('makensis', 'install-tl');
+ &xsystem ("makensis -V4 install-tl >$tmpdir/install-tl-nsis.log");
} elsif ($type eq 'tgz') {
- system ('tar', '-czf', 'install-tl-unx.tar.gz', $install_tl_name);
+ &xsystem ('tar', '-czf', 'install-tl-unx.tar.gz', $install_tl_name);
- } else (
+ } else {
die "unknown install package type $type";
- )
+ }
+ &xchdir ($prevdir);
}
@@ -227,7 +231,7 @@ sub make_zip {
sub install_files {
$outputdir = abs_path ($outputdir);
info ("$0: Installing to $outputdir\n");
- for my $f ("install-tl-unx.tar.gz", "install-tl.zip", "install-tl.exe") {
+ for my $f ("install-tl-unx.tar.gz", "install-tl.zip") {#, "install-tl.exe") {
copy ("$tmpdir/$f", $outputdir);
system ("cd $outputdir && sha256sum $f >$f.sha256");
system ('ls', '-l', "$outputdir/$f");