summaryrefslogtreecommitdiff
path: root/Master/tlpkg/etc
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-05-01 13:35:34 +0000
committerNorbert Preining <preining@logic.at>2009-05-01 13:35:34 +0000
commitfe86ccee470f368a927cee02d1b4045239af34ad (patch)
tree4172e24a18946d6def18854039a9bdcdce911a4f /Master/tlpkg/etc
parent5ad7b110479745c95a2d486ff529ede9a668acbd (diff)
updates to the makeself-runscript
git-svn-id: svn://tug.org/texlive/trunk@12905 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/etc')
-rwxr-xr-xMaster/tlpkg/etc/makeself-runscript.sh79
1 files changed, 46 insertions, 33 deletions
diff --git a/Master/tlpkg/etc/makeself-runscript.sh b/Master/tlpkg/etc/makeself-runscript.sh
index 2b70882466f..f1a48e59c5d 100755
--- a/Master/tlpkg/etc/makeself-runscript.sh
+++ b/Master/tlpkg/etc/makeself-runscript.sh
@@ -2,41 +2,52 @@
# Updater for tlmgr and infrastructure on Unix.
# Runs in unpacked archive directory.
-NEWINST=0
+ROOT=`kpsewhich --var-value=SELFAUTOPARENT`
-if [ "$1" = "-new-install" ] ; then
- if [ -z "$2" ] ; then
- echo "option -new-install needs the destination folder." >&2
- echo "terminating."
- exit 1
- fi
- NEWINST=1
- ROOT="$2"
- # make sure that we die if something breaks here
- set -e
- mkdir -p "$ROOT/tlpkg/tlpobj"
- mkdir -p "$ROOT/bin"
+if test -r "$ROOT/tlpkg/texlive.tlpdb"; then
+ # nothing to do here
+ answer=0
else
- NEWINST=0
- ROOT=`kpsewhich --var-value=SELFAUTOPARENT`
- if test -r "$ROOT/tlpkg/texlive.tlpdb"; then
- # nothing to do here
- :
- else
- cat <<END_ABORT_NODIR >&2
-$0: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT.
-$0: Please call update-tlmgr-latest.sh --noexec --keep
-$0: and then call the runme.sh script in the unpacked directory
-$0: with the directory root as the first argument, something like:
-$0: sh runme.sh /path/to/your/texlive/installation/2008
-END_ABORT_NODIR
- exit 1
- fi
+ answer=x
+ echo "No installation found, please select from the following options:"
+ echo "[1] make new installation"
+ echo "[2] enter path to an existing installation"
+ echo "[x] exit (default)"
+ echo -n "Your selection: "
+ read answer
fi
-
-#
-# from now on we are in the normal update path
+case "X$answer" in
+ X0) NEWINST=0
+ ;;
+ X1) echo -n "Enter destination folder: "
+ read newpath
+ if [ -z "$newpath" ] ; then
+ echo "No destination folder given, exiting."
+ exit 1
+ fi
+ ROOT="$newpath"
+ NEWINST=1
+ set -e
+ mkdir -p "$ROOT/tlpkg/tlpobj"
+ mkdir -p "$ROOT/bin"
+ ;;
+ X2) echo -n "Path to an existing installation: "
+ read oldpath
+ notgood=1
+ if [ -d $oldpath ] ; then
+ if [ -r "$oldpath/tlpkg/texlive.tlpdb" ] ; then
+ notgood=0;
+ fi
+ fi
+ if [ $notgood = 1 ] ; then
+ echo "Cannot find TeX Live root in $oldpath, exiting."
+ exit 1
+ fi
+ ;;
+ *) exit 0;;
+esac
+
#
if [ $NEWINST = 1 ] ; then
echo "$0: installing to $ROOT..."
@@ -135,11 +146,12 @@ if [ $NEWINST = 1 ] ; then
tlmgr option location /var/www/norbert/tlnet/2008
tlmgr install bin-kpathsea
tlmgr install hyphen-base
+ tlmgr install bin-tetex
+ tlmgr install bin-texconfig
tlmgr generate updmap
tlmgr generate language
tlmgr generate fmtutil
- tlmgr install bin-tetex
- tlmgr install bin-texconfig
+ mktexlsr
updmap-sys
fmtutil-sys --all # should not do anything!
#
@@ -148,3 +160,4 @@ if [ $NEWINST = 1 ] ; then
#tlmgr install collection-basic
fi
echo "$0: done."
+