summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-try-install
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-10-19 16:08:59 +0000
committerKarl Berry <karl@freefriends.org>2019-10-19 16:08:59 +0000
commit49ea40123197f52d14c0ce25a2779c533ee76052 (patch)
tree03120704d0d10a7db43fb12a186a03353b73afd1 /Master/tlpkg/bin/tl-try-install
parent6bb29a35800bd1c157d95a936ec49e7bca7d980c (diff)
check-tlnet-consistency: also rmdir $tempbase, else empty temp/
directory is left behind in a new tlnet repo. tl-update-images: try -e for xz for extra cpu-based compression. tl-try-install: rewrite with options. git-svn-id: svn://tug.org/texlive/trunk@52442 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-try-install')
-rwxr-xr-xMaster/tlpkg/bin/tl-try-install63
1 files changed, 50 insertions, 13 deletions
diff --git a/Master/tlpkg/bin/tl-try-install b/Master/tlpkg/bin/tl-try-install
index e1e1f6814ec..fed5efb1d99 100755
--- a/Master/tlpkg/bin/tl-try-install
+++ b/Master/tlpkg/bin/tl-try-install
@@ -1,28 +1,65 @@
#!/bin/sh
-# $Id$
-# Try a TL installation with various profiles into /tmp/ki. Public domain.
+# Public domain.
+# Try a TL installation into /tmp/ki (hardwired),
+# using install-tl with a given profile.
+vc_id='$Id$'
renice 20 $$ >&/dev/null
-instdir=/tmp/ki # in .pro files too
-rm -rf $instdir* && echo "removed $instdir*."
-
-# make installations quieter.
-#TEXLIVE_INSTALL_ENV_NOCHECK=1; export TEXLIVE_INSTALL_ENV_NOCHECK
-#TEXLIVE_INSTALL_NO_WELCOME=1; export TEXLIVE_INSTALL_NO_WELCOME
+# don't let cwd or existing PATH interfere
+cd "$HOME" || exit 1
+PATH=/usr/local/bin:/usr/bin:/bin # /usr/local/bin for good perl on tug
real0=`realpath $0`
mydir=`cd \`dirname "$real0"\` && pwd` # Master/tlpkg/bin
Master=`cd $mydir/../.. && pwd`
profiledir=$Master/tlpkg/dev/profiles
-# don't let cwd or existing PATH interfere
-cd "$HOME" || exit 1
-PATH=/usr/local/bin:/usr/bin:/bin # /usr/local/bin for good perl on tug
+profile=$profiledir/TLinfra.pro
+repo=$Master
+
+while test $# -gt 0; do
+ case $1 in
+ --profile) shift; profile=$1;;
+ --repo) shift; repo=$1;;
+ --help) echo "ustl. sorry."; exit 0;;
+ --version) echo "$vc_id"; exit 0;;
+ *) echo "$0: unrecognized option \`$1'." >&2
+ exit 1;;
+ esac
+ shift
+done
+
+if test ! -f "$profile"; then
+ # convenience silliness
+ if test -f "$profiledir/$profile"; then
+ profile=$profiledir/$profile
+ elif test -f "$profiledir/TL$profile"; then
+ profile=$profiledir/TL$profile
+ elif test -f "$profiledir/TL$profile.pro"; then
+ profile=$profiledir/TL$profile.pro
+ else
+ echo "$0: goodbye, no profile \`$profile' (not in $profiledir either)." >&2
+ exit 1
+ fi
+fi
+
+if test ! -x "$repo/install-tl"; then
+ echo "$0: goodbye, no install-tl in repository: $repo" >&2
+ exit 1
+fi
+
+instdir=/tmp/ki # also specified in *.pro, so not enough to change it here.
+rm -rf $instdir* && echo "removed $instdir*."
+
+# make installations quieter.
+#TEXLIVE_INSTALL_ENV_NOCHECK=1; export TEXLIVE_INSTALL_ENV_NOCHECK
+#TEXLIVE_INSTALL_NO_WELCOME=1; export TEXLIVE_INSTALL_NO_WELCOME
set -x
-pro=--profile=${1-$profiledir/TLinfra.pro} #infra min ... full
-exec time $Master/install-tl $pro
+pro=--profile=$profile
+exec time $repo/install-tl $pro
+
cust=--custom-bin=$wb
exec time $Master/install-tl $cust $pro
exec time $lp/install-tl $pro