summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-makeself-from-tlnet
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-08-01 02:04:28 +0000
committerKarl Berry <karl@freefriends.org>2018-08-01 02:04:28 +0000
commitc70a9d62d23e2c3bd11719ef5af274c9a0c8471c (patch)
treeeac9b16dbb002e5ad79ff8067f7763187eef7dcb /Master/tlpkg/bin/tl-makeself-from-tlnet
parent93cb3b67055ad40191ca6c7556e876ea5c05bd29 (diff)
bin/tl-makeself-from-tlnet: new -- --debug option for embedded script;
copy Windows support files into archive; special case installation of xz.exe, wget.exe, tar.exe if we are updating the win32 platform. https://github.com/amaxwell/tlutility/issues/65 bin/tl-try-makeself: allow args to override, default to /tmp/krit and /tmp/ki. bin/tl-try-install: allow arg to specify profile; doc. dev/profiles/TLinfra+exe.pro: new test profile with multiple platforms, including Windows. Doc updates to other *.pro. install-tl: do not output Perl warning if binary_* is specified without a value; doc. (Not yet implemented: should give our own warning.) git-svn-id: svn://tug.org/texlive/trunk@48328 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-makeself-from-tlnet')
-rwxr-xr-xMaster/tlpkg/bin/tl-makeself-from-tlnet65
1 files changed, 52 insertions, 13 deletions
diff --git a/Master/tlpkg/bin/tl-makeself-from-tlnet b/Master/tlpkg/bin/tl-makeself-from-tlnet
index f0b393f63cf..27edef7e264 100755
--- a/Master/tlpkg/bin/tl-makeself-from-tlnet
+++ b/Master/tlpkg/bin/tl-makeself-from-tlnet
@@ -13,6 +13,19 @@
# The resulting update-tlmgr-*.sh is run (by the user) in the TL
# installation directory to be updated; it uses kpsewhich from PATH to
# determine what to do update.
+#
+# Debugging/development/testing:
+# - create test hierarchy; either run install-tl as you like, or:
+# tl-try-install Master/tlpkg/dev/profiles/TLinfra+exe.pro # or whatever
+# This creates /tmp/ki with various platforms.
+# - then see tl-try-makeself:
+# running that will copy tlcritical to /tmp/krit,
+# run this script (tl-makeself-from-tlnet) there,
+# then update /tmp/ki from /tmp/krit, that is,
+# doing an update as a user would do in their installed hierarchy.
+#
+# update-tlmgr-r*.sh --list # list files included in archive
+# update-tlmgr-r*.sh -- --debug # run embedded script with -vx and more
mydir=`cd \`dirname "$0"\` && pwd` # Master/tlpkg/bin
PATH=$mydir:$PATH # for tlpkginfo
@@ -56,11 +69,8 @@ if test -z "$infrarev"; then
fi
#
for i in "$ARCHIVE"/$infrapkg*.tar.xz; do
- case "$i" in
- *win32*) ;;
- *) : "uncompressing $i" # for debugging
- xz -d <"$i" | tar -xf - || exit 1;;
- esac
+ : "uncompressing $i" # for debugging
+ xz -d <"$i" | tar -xf - || exit 1
done
cd .. # back to the (temp) dir where we building things up
@@ -75,6 +85,7 @@ cat >runme.sh <<END_RUNME
# Runs in unpacked archive directory.
# Created by `basename $0` at `date`.
+creation_date="`date`"
NETRELEASE=$NETRELEASE
MINRELEASE=$MINRELEASE
infrapkg=$infrapkg
@@ -94,19 +105,33 @@ if test -r "$ROOT/tlpkg/texlive.tlpdb" && test -d "$ROOT/tlpkg/tlpobj/"; then
if test -z "$tlmgrversion"; then
echo "$0: tlmgr version did not include version, goodbye." >&2
tlmgr version >&2
+ echo "($0: makeself creation date = $creation_date.)" >&2
exit 1
fi
#
echo "$0: tlmgr version says this is TeX Live $tlmgrversion"
+ #
+ # Extra-verbose debugging option.
+ if test "x$1" = "x--debug"; then
+ shift
+ opt_debug=1
+ set -vx
+ : "$0: makeself creation date = $creation_date."
+ else
+ opt_debug=
+ fi
+ #
if test "x$1" = "x--upgrade"; then
if test "x$NETRELEASE" = "x$tlmgrversion"; then
echo "$0: have TL $tlmgrversion, new version also $NETRELEASE;">&2
echo "$0: using --upgrade doesn't make sense; terminating." >&2
+ echo "($0: makeself creation date = $creation_date.)" >&2
exit 1
elif test "$tlmgrversion" -lt "$MINRELEASE"; then
echo "$0: upgrading from $tlmgrversion not supported;" >&2
echo "$0: can only upgrade from $MINRELEASE to $NETRELEASE." >&2
echo "$0: terminating." >&2
+ echo "($0: makeself creation date = $creation_date.)" >&2
exit 1
else
echo "$0: ok, doing full release upgrade " \
@@ -120,9 +145,10 @@ if test -r "$ROOT/tlpkg/texlive.tlpdb" && test -d "$ROOT/tlpkg/tlpobj/"; then
# them all. The loop below and tlmgr invocation at the end will update.
mv ./master/bin .
mkdir ./installer
- mv ./master/tlpkg/installer/xz ./installer
+ mv ./master/tlpkg/installer/tar.exe ./installer
+ mv ./master/tlpkg/installer/xz ./installer
mv ./master/tlpkg/installer/wget ./installer
- mv ./master/tlpkg/installer/lz4 ./installer # could be anywhere
+ mv ./master/tlpkg/installer/lz4 ./installer # could be anywhere
# install the architecture-independent files.
(cd master && tar cf - *) | (cd "$ROOT" && tar xf -) || exit 1
@@ -144,26 +170,39 @@ if test -r "$ROOT/tlpkg/texlive.tlpdb" && test -d "$ROOT/tlpkg/tlpobj/"; then
src_tlpobj=master/tlpkg/tlpobj
tlpobjs=$src_tlpobj/$infrapkg.tlpobj
- # for each installed directory of binaries
+ if test -n "$opt_debug"; then
+ (: "here (`pwd`):"; ls) >&2
+ (: "installer:"; ls installer) >&2
+ (: "installer/wget:"; ls installer/wget) >&2
+ (: "installer/xz:"; ls installer/xz) >&2
+ (: "ROOT/bin=$ROOT/bin:"; ls "$ROOT"/bin) >&2
+ fi
+
+ # for each installed directory of binaries ...
for a in "$ROOT"/bin/*; do
test -d "$a" || continue # skip any cruft files
b=`basename "$a"` # just the architecture name
- echo "$0: updating $a..."
+ echo "$0: updating $a ..."
# add the tlpobjs for this platform to the list.
tlpobjs="$tlpobjs $src_tlpobj/$infrapkg.$b.tlpobj"
# install the bin dir for this platform.
- (cd bin && tar cf - "$b") | (cd "$ROOT/bin" && tar xf -) || exit 1
+ (cd bin >&2 && tar cf - "$b") | (cd "$ROOT/bin" && tar xf -) || exit 1
- # copy the xz binaries, sometimes with .exe, for Cygwin.
+ # copy the xz binaries:
if test -r installer/xz/xz."$b"; then
cp installer/xz/xz."$b" "$t_xzdir/" || exit 1
elif test -r installer/xz/xz."$b".exe; then
+ # with .exe, for Cygwin.
cp installer/xz/xz."$b".exe "$t_xzdir/" || exit 1
+ elif test "$b" = win32 && test -r installer/xz/xz.exe; then
+ # annoyingly, we left .win32 out of the name, special cases all around:
+ cp installer/xz/xz.exe "$t_xzdir/" || exit 1
+ cp installer/wget/wget.exe "$t_wgetdir/" || exit 1
+ cp installer/tar.exe "$t_instdir/" || exit 1
else
- echo "$0: no xz.$b[.exe] binary for $a in `pwd`/installer/xz." >&2
- ls installer/xz >&2
+ echo "$0: no xz.[$b][.exe] binary for $a in `pwd`/installer/xz." >&2
exit 1
fi
#