summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-12-01 01:45:57 +0000
committerKarl Berry <karl@freefriends.org>2008-12-01 01:45:57 +0000
commit81e79cc05b383d38bcf3c7627cfee9079a94f155 (patch)
tree69352bef7120f00ad755158721725de718866a1e /Master/tlpkg/bin
parentf33d3e3a849c1da12b3681ea9459703b201befbf (diff)
new utility fns xchdir and xsystem; use them in update-install-pkg; new option to avoid test install in update-tlnet
git-svn-id: svn://tug.org/texlive/trunk@11486 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-install-pkg40
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlnet18
2 files changed, 19 insertions, 39 deletions
diff --git a/Master/tlpkg/bin/tl-update-install-pkg b/Master/tlpkg/bin/tl-update-install-pkg
index 2887999a231..9e1f429165e 100755
--- a/Master/tlpkg/bin/tl-update-install-pkg
+++ b/Master/tlpkg/bin/tl-update-install-pkg
@@ -24,15 +24,16 @@ BEGIN {
unshift (@INC, "$::installerdir/tlpkg");
}
-use TeXLive::TLUtils qw(mkdirhier copy get_system_tmpdir info);
-use TeXLive::TLPDB;
-use TeXLive::TLPOBJ;
+use Cwd qw(abs_path);
use Getopt::Long;
-use Cwd 'abs_path';
$Getopt::Long::autoabbrev=0;
-$opt_help=0;
-$opt_verbose=0;
+use TeXLive::TLPDB;
+use TeXLive::TLPOBJ;
+use TeXLive::TLUtils qw(:DEFAULT mkdirhier copy get_system_tmpdir);
+
+$opt_help = 0;
+$opt_verbose = 0;
$opt_texlivedocs = 0;
sub usage
@@ -223,37 +224,12 @@ sub install_files
# move what we want (corresponds to the mv into savedir) and erase the rest.
xsystem ("mv $junkdir/install-tl/install-tl* .");
+ xsystem ("rm -rf tlpkg/TeXLive tlpkg/installer");
xsystem ("mv $junkdir/install-tl/tlpkg/* tlpkg/");
xsystem ("rm -rf $junkdir");
}
-# chdir or die.
-#
-sub xchdir
-{
- my ($dir) = @_;
- chdir ($dir) || die "chdir($dir) failed: $!";
- #chomp (my $pwd = `pwd`);
- #print "\t CHDIR $dir (now $pwd)\n";
-}
-
-
-# system or die.
-#
-sub xsystem
-{
- my (@args) = @_;
- print "$0: running system(@args)\n";
- my $retval = system (@args);
- if ($retval != 0) {
- $retval /= 256;
- chomp (my $pwd = `pwd`);
- die "system(@args) failed in $pwd, status $retval";
- }
-}
-
-
### Local Variables:
### perl-indent-level: 2
### tab-width: 2
diff --git a/Master/tlpkg/bin/tl-update-tlnet b/Master/tlpkg/bin/tl-update-tlnet
index 1d974550297..1327209c257 100755
--- a/Master/tlpkg/bin/tl-update-tlnet
+++ b/Master/tlpkg/bin/tl-update-tlnet
@@ -12,17 +12,19 @@ unset LS_COLORS
chicken=false
critical=
recreate=
+testinstall=true
yyyy=2008
while test $# -gt 0; do
case $1 in
- --critical) critical=--all;;
- --dry-run|-n) chicken=true;;
- --master) shift; Master=$1;;
- --recreate) recreate=--recreate;;
- --testlocation) shift; tltrybase=$1;;
- --help) echo "xxtodo. Sorry."; exit 0;;
- --version) echo "$vc_id"; exit 0;;
+ --critical) critical=--all;;
+ --dry-run|-n) chicken=true;;
+ --master) shift; Master=$1;;
+ --no-testinstall|-N) testinstall=false;;
+ --recreate) recreate=--recreate;;
+ --testlocation) shift; tltrybase=$1;;
+ --help) echo "xxtodo. Sorry."; exit 0;;
+ --version) echo "$vc_id"; exit 0;;
--*) echo "$0: unrecognized option \`$1'." >&2
exit 1;;
*) tlweb=$1;;
@@ -71,6 +73,8 @@ echo "$0: Running tl-update-install-pkg..."
$Master/tlpkg/bin/tl-update-install-pkg -o $tltry
END_COW
+# if not doing the test installation, never push anything out.
+$testinstall || exit 0
#
# Now we have an updated tlweb in $tltry where only the changed files