diff options
-rwxr-xr-x | Master/tlpkg/bin/tl-makeself-from-tlnet | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Master/tlpkg/bin/tl-makeself-from-tlnet b/Master/tlpkg/bin/tl-makeself-from-tlnet index f24cdd89168..8b5766b98fc 100755 --- a/Master/tlpkg/bin/tl-makeself-from-tlnet +++ b/Master/tlpkg/bin/tl-makeself-from-tlnet @@ -24,7 +24,7 @@ if test ! -d "$ARCHIVE"; then exit 1 fi -TLRELEASE=`grep '^depend release/' $TLNET/tlpkg/texlive.tlpdb | sed -e 's!^depend release/!!'` +TLRELEASE=`sed -n 's!^depend release/!!p' $TLNET/tlpkg/texlive.tlpdb` cd $TMP mkdir master @@ -32,7 +32,7 @@ cd master # unpack texlive.infra archives for all platforms, except w32. for pkg in texlive.infra; do - for i in $ARCHIVE/$pkg*.tar.xz ; do + for i in $ARCHIVE/$pkg*.tar.xz; do case "$i" in *win32*) ;; *) xzdec <$i | tar -xf - ;; @@ -53,25 +53,25 @@ WORKINGRELEASE=$TLRELEASE END_RUNME +# append to runme literally now. cat >>runme.sh <<'END_RUNME' ROOT=`kpsewhich --var-value=SELFAUTOPARENT` if test -r "$ROOT/tlpkg/texlive.tlpdb"; then echo "$0: updating in $ROOT..." - tlmgrversion=`tlmgr version | grep '^TeX Live' | sed -e 's!^TeX Live (http://tug.org/texlive) version !!'` + tlmgrversion=`tlmgr version | grep '^TeX Live.*version' | awk '{print $NF}'` echo "$0: found TeX Live $tlmgrversion" - if [ ! $WORKINGRELEASE = "$tlmgrversion" ] ; then - if [ "$1" = "--upgrade" ] ; then - echo "$0: upgrading from $tlmgrversion to $WORKINGRELEASE" + if test "x$WORKINGRELEASE" != "x$tlmgrversion"; then + if test "x$1" = "x--upgrade"; then + echo "$0: upgrading from $tlmgrversion to $WORKINGRELEASE." else - echo "$0: upgrading is not supported. target release is $WORKINGRELEASE" + echo "$0: upgrading not supported: target release is $WORKINGRELEASE" >&2 exit 1 fi fi # move the architecture-specific files to the top level. mv ./master/bin . - #mv ./master/tlpkg/installer . mkdir ./installer mv ./master/tlpkg/installer/xz ./installer mv ./master/tlpkg/installer/wget ./installer |