#!/bin/sh ################################################################ # Basic IO: ################################################################ ################################################################ # read: called with the name of a variable and (optionally) a # different message text. Keeps the old value of the # variable, if the empty string in entered. ################################################################ gets() { gets_var=$1; gets_text=${2-$gets_var} eval old=\$$gets_var eval $echon \""New value for $gets_text [$old]: "\" read $gets_var eval test -z \"\$$gets_var\" && eval $gets_var=\'$old\' } ################################################################ # getopt: get a menu choice. # $1: string with valid characters # $2: message for prompting ################################################################ getopt() { chars=$1; msg=$2 while true; do #$echon "$msg ([$chars]): " $echon "$msg: " >&2 read ans ans=`echo $ans | tr '[a-z]' '[A-Z]'` case "$ans" in [$chars]) echo "$ans" return esac done } ################################################################ # toolge: given the name of a variable, toogle switches between # the values ' ' and X. ################################################################ toggle() { if eval test \"\$$1\" = X; then eval $1=\' \' else eval $1=X fi } ################################################################ # This tricky function displays the value of a variable that can # contain newline characters. Variables will be expanded, too. # Arguments: # 1: the name of the variable ################################################################ textvar_show() { OLDIFS=$IFS; IFS=''; eval echo \"`eval echo \\$${1}`\" IFS=$OLDIFS } readln() { $echon 'Press return to continue... ' read foo } help() { var=$1 cls textvar_show $var 2>&1 | $PAGER echo readln } ################################################################ # Use the yesno functions to ask the user a simple yes/no # question. # Arguments: # $1: test to display for the question (" (Y/N)? " will # automatically be appended). ################################################################ yesno() { while true; do $echon "$1 (Y/N)? " read ans case $ans in y|Y) return 0;; n|N) return 1;; esac done } ################################################################ # A set of functions the might do an echo without linefeed in # the end. Function find_echo sets the variable "echon" to a # suitable function. ################################################################ echo_a() { echo -n "$@"; } echo_b() { echo "$@\c"; } echo_c() { echo -e "$@\c"; } echo_d() { /bin/echo -n "$@"; } echo_e() { /bin/echo "$@\c"; } echo_f() { /bin/echo -e "$@\c"; } ################################################################ # Test which of the above functions does the trick. We set # the variable "echon" to the first function that works # correctly. ################################################################ find_echo() { for i in a b c d e f; do test "`echo_$i c``echo_$i a`" = ca && echon=echo_$i && return done echon=echo } ################################################################ # series and packages management: ################################################################ ############################################################################### # The series structure: # s_${series}_la: "list of all packages" # s_${series}_lf: "list of packages we found on the disk" # s_${series}_ls: "list of selected packages" # s_${series}_mis: "list of packages that are missing" # s_${series}_nf: "number of packages we find" # s_${series}_ns: "number of selected packages" # s_${series}_nmis: "number of packages that are missing" # s_${series}_du: "disk space usage of all packages found" # s_${series}_dus: "disk space usage of selected packages" # s_${series}_h: "help text" ############################################################################### ############################################################################### # The package structure: # p_${package}_n: "the name of the package" # p_${package}_s: "is the package selected?" # p_${package}_l: "level: required, recommended or optional" # p_${package}_da: "did we find the package?" # p_${package}_fn: "the filename of a package the we found" # p_${package}_h: "help text" ############################################################################### allseries_locate() { for al_series in $S_all_la; do series_locate $al_series; done } allseries_locate_check() { notall=false hasbin=false test "$this_platform" != "" && eval test \"\$p_${this_platform}_da\" = true && hasbin=true for alc_series in $S_all_la; do test $alc_series = bin && $hasbin && continue eval alc_all_packages=\"\$s_${alc_series}_la\" for alc_p in $alc_all_packages; do if eval test \"\$p_${alc_p}_da\" = false; then notall=true eval echo \""Warning: package not found: \${p_${alc_p}_d-$alc_p} (series: $alc_series)."\" fi done done if test "$notall" = true; then echo echo "Notice: ignore the warnings, if the packages are missing intentionally." echo $echon "Press return to continue or Control-C to abort... " read foo fi } series_locate() { sl_series=$1 eval sl_all_packages=\"\$s_${sl_series}_la\" eval dft_dir=\"\$s_${sl_series}_d\" lf=; mis=; nmis=0; nf=0 for sl_p in $sl_all_packages; do eval bn=\${p_${sl_p}_d-$sl_p} fn= test -f $here/$dft_dir/$bn.tar.gz && fn=$here/$dft_dir/$bn.tar.gz test -f $here/$bn.tar.gz && fn=$here/$bn.tar.gz if test -z "$fn"; then eval p_${sl_p}_da=false eval p_${sl_p}_fn= mis="$mis $sl_p" nmis=`expr $nmis + 1` else eval p_${sl_p}_da=true eval p_${sl_p}_fn=$fn lf="$lf $sl_p" nf=`expr $nf + 1` fi done eval s_${sl_series}_lf=\"$lf\" eval s_${sl_series}_mis=\"$mis\" eval s_${sl_series}_nmis=$nmis eval s_${sl_series}_nf=$nf setlength s_${sl_series}_nf 2 } series_select_all() { ssa_series=$1 eval all_packages=\"\$s_${ssa_series}_lf\" for ssa_p in $all_packages; do package_select $ssa_p done series_stat $ssa_series } series_deselect_all() { sda_series=$1 eval all_packages=\"\$s_${sda_series}_lf\" for sda_p in $all_packages; do package_deselect $sda_p done series_stat $sda_series } series_stat() { series=$1 dus=0 ns=0 ls='' eval ss_all_packages=\"\$s_${series}_lf\" for ss_p in $ss_all_packages; do eval \$p_${ss_p}_s || continue eval newdu=\"\$p_${ss_p}_du\" if test -z "$newdu"; then echo "unknown disk space usage for package: $ss_p" newdu=0 fi ls="$ls $ss_p" ns=`expr $ns + 1` dus=`expr $dus + $newdu` done eval s_${series}_dus=\$dus setlength s_${series}_dus 5 eval s_${series}_ns=\$ns setlength s_${series}_ns 2 eval s_${series}_ls=\$ls } nobin_stat() { dus=0; nf=0; ns=0; for ns_series in $S_nobin_la; do eval dus=\`expr \$dus + \$s_${ns_series}_dus\` eval nf=\` expr \$nf + \$s_${ns_series}_nf\` eval ns=\` expr \$ns + \$s_${ns_series}_ns\` done S_nobin_dus=$dus; setlength S_nobin_dus 5 S_nobin_nf=$nf; setlength S_nobin_nf 2 S_nobin_ns=$ns; setlength S_nobin_ns 2 total_stat } total_stat() { s_total_dus=`expr $s_bin_dus + $S_nobin_dus`; setlength s_total_dus 5 s_total_nf=`expr $s_bin_nf + $S_nobin_nf`; setlength s_total_nf 2 s_total_ns=`expr $s_bin_ns + $S_nobin_ns`; setlength s_total_du 2 } package_select() { eval p_${1}_s=true; } package_deselect() { eval p_${1}_s=false; } series_list() { sl_series=$1 cls echo "Series \`\`$sl_series'' statistics:"; echo echo " package name size selected" echo " --------------------------------------------" eval sl_all_p=\"\$s_${sl_series}_lf\" for sl_p in $sl_all_p; do eval sl_n=\"\$p_${sl_p}_n\" eval sl_du=\"\$p_${sl_p}_du\" eval sl_s=\"\$p_${sl_p}_s\" if $sl_s; then sl_s='[X]'; else sl_s='[ ]'; fi setlength sl_n 30 setlength sl_du 5 echo "$sl_n ${sl_du}k $sl_s" done eval sl_s_dus=\"\$s_${sl_series}_dus\" setlength sl_s_dus 5 echo " --------------------------------------------" echo " selected size: ${sl_s_dus}k" echo echo readln } series_init() { $echon "Locating packages... "; allseries_locate; echo "Done." $echon "Initializing series... " for si_series in $S_nobin_la; do series_select_all $si_series done echo "Done." series_deselect_all bin test -z "$this_platform" || { this_platform_set "$this_platform" package_select "$this_platform" series_stat bin } allseries_locate_check } this_platform_set() { this_platform="$1" for tps_p in $s_bin_lf; do eval p_${tps_p}_l=optional done series_deselect_all bin if test -z "$this_platform"; then this_platform_n= this_platform_d= else package_select ${this_platform} series_stat bin eval this_platform_n=\$p_${this_platform}_n eval this_platform_d=\$p_${this_platform}_d eval p_${this_platform}_l=required fi nobin_stat } ################################################################ #debugging: ################################################################ series_dbg() { series=$1 eval echo \""all packages: '\$s_${series}_la'"\" eval echo \""default dir: '\$s_${series}_d'"\" eval echo \""selected: '\$s_${series}_ls'"\" eval echo \""found: '\$s_${series}_lf'"\" eval echo \""missing: '\$s_${series}_mis'"\" eval echo \""anz found: '\$s_${series}_nf'"\" eval echo \""anz missing: '\$s_${series}_nmis'"\" eval echo \""anz selected: '\$s_${series}_ns'"\" eval echo \""du total: '\$s_${series}_du'"\" eval echo \""du selected: '\$s_${series}_dus'"\" echo help: textvar_show s_${series}_h echo } package_dbg() { p=$1 eval echo \""gefunden: '\$p_${p}_da'"\" eval echo \""filename: '\$p_${p}_fn'"\" eval echo \""du: '\$p_${p}_du'"\" eval echo \""version: '\$p_${p}_v'"\" eval echo \""selected: '\$p_${p}_s'"\" eval echo \""name: '\$p_${p}_n'"\" echo help: textvar_show p_${p}_h echo } ################################################################ # utility functions: ################################################################ bad_sh() { /bin/sh -c 'exit 1' retval=$? if test "$retval" != 1; then echo echo 'Your /bin/sh is completely broken. A simple program like' echo echo " /bin/sh -c 'exit 1'; echo \$?" echo echo "gives a wrong result." echo echo 'Your shell is likely to break some scripts of teTeX. Please' echo 'update your /bin/sh first and try to install teTeX later.' echo 'GNU bash 1.14.5 will do, whereas bash 1.14.3 is known to have' echo 'problems.' echo exit 1 fi } warning() { echo "$@" } cls() { test "$debug" = true || clear } check_for_binary() { testbin=$1 case "$testbin" in /*) test -x "$testbin" && test -f "$testbin"; return;; *) OLDIFS=$IFS; IFS=:; eval set $PATH; IFS=$OLDIFS for this_dir do test -x "$this_dir/$testbin" && test -f "$this_dir/$testbin" && return 0 done return 1;; esac } require_binaries() { for this_bin do check_for_binary $this_bin || fatal "program '$this_bin' not found in PATH" done } man_fix_texmf() { file=$TETEXDIR/man/man1/bibtex.1 test -f "$file" || return man_texmf_old=`grep texmf/bibtex/bst $file 2>/dev/null | sed 's@.*:@@; s@/bibtex/bst@@'` test -z "$man_texmf_old" && man_texmf_old=$man_texmf_old_fallback man_tetexdir_old=`dirname "$man_texmf_old"` test -z "$man_tetexdir_old" && man_tetexdir_old=$man_tetexdir_old_fallback if test "$opt_savespace_man_rm" = X; then rm -f $TETEXDIR/man/man*/* rmdir $TETEXDIR/man/man* fi 2>/dev/null if test "$TEXMF" != "$man_texmf_old" || test "$man_tetexdir_old" != "$TETEXDIR"; then $echon "Fixing pathnames in the manualpages... " for mpage in $TETEXDIR/man/*/*[0-9]; do sed s@$man_texmf_old@$TEXMF@g\;s@$man_tetexdir_old@$TETEXDIR@g \ $mpage > $TMPDIR/man.tmp.$$ test -s $TMPDIR/man.tmp.$$ && mv $TMPDIR/man.tmp.$$ $mpage done echo "Done." fi test "$opt_savespace_man_gzip" = X && gzip $TETEXDIR/man/cat*/*.[1.9] touch $TETEXDIR/man/cat*/* 2>/dev/null } maketex_setopt() { mtsite=$TEXMF/$mt_site_loc test -w "$mtsite" || return test -w "$TETEXDIR/texmf.cnf" || return test "$opt_varfonts" = X || return ed "$TETEXDIR/texmf.cnf" >$ERRLOG 2>&1 <$ERRLOG 2>&1 <<'eof' /^: \${MT_FEATURES=/ s/}/:varfonts}/ w q eof show_error } texmfcnf_fix_texmf() { test "$TETEXDIR/texmf" = "$TEXMF" && return test -w "$TETEXDIR/texmf.cnf" || return ed "$TETEXDIR/texmf.cnf" >$ERRLOG 2>&1 <<-eof /^TEXMF.*=/ c TEXMF = $TEXMF . w q eof show_error rm -f $TETEXDIR/texmf } texmfcnf_fix_tetexdir() { test -f $TETEXDIR/texmf.cnf || return if test ! -w "$TETEXDIR/texmf.cnf"; then warning "Warning: cannot write to file $TETEXDIR/texmf.cnf" readln return fi if $platform_subdir_strip = true; then newtexmf='$SELFAUTODIR' else newtexmf='$SELFAUTOPARENT' fi ed "$TETEXDIR/texmf.cnf" >$ERRLOG 2>&1 <<-eof /^TETEXDIR.*=/ c TETEXDIR = $newtexmf . w q eof show_error } # fill a string with blanks: setlength() { var=$1 length=$2 eval value=\"\$$var\" l=`expr "$value" : '.*'` test $l -lt $length || return d=`expr $length - $l` OLDIFS=$IFS; IFS='' substr=`awk 'END {print substr(" ", 1, ANZ)}' ANZ=$d /dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`uname -r 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`uname -s 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`uname -v 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *86:FreeBSD:2.0.5*:*) echo i386_freebsd205;; *86:FreeBSD:*:*) echo i386_freebsd210;; *86:NetBSD:1.0:*) echo i386_netbsd10;; *86:NetBSD:*:*) echo i386_netbsd11;; *86:*:*:BSDI*) echo i386_bsdi20;; m68k:Linux:*:*) { /sbin/ldconfig -v | grep libc.so.5; } >/dev/null 2>&1 if test $? = 0; then echo m68k_linux else echo m68k_linuxaout fi;; *:Linux:*:*) { /sbin/ldconfig -v | grep libc.so.5; } >/dev/null 2>&1 if test $? = 0; then echo i486_linux else echo i486_linuxaout fi;; *:IRIX*:*:*) echo mips_irix53;; *:AIX:2:3) echo rs6000_aix32;; sun4*:SunOS:5.*:*) echo sparc_solaris24;; sun4*:SunOS:*:*) echo sparc_sunos413;; alpha:OSF1:V3*:*) echo alpha_osf32;; alpha:OSF1:*:*) echo alpha_osf20;; 9000*:HP-UX:*:*) echo hppa11_hpux901;; *:ULTRIX:*:*) echo mips_ultrix_44;; esac } unset_vars() { for var in $envvars; do unset $var done } mkdirhier() { case $1 in /*) cd /;; esac OLDIFS=$IFS; IFS=/; eval set $1; IFS=$OLDIFS for i do test -d $i || mkdir $i || break cd $i || break done } # [t]ry again, [r]econfigure, [a] abort tra() { msg=$1 cls echo "Oops, I am in trouble here! The error was:" echo ">> $msg <<" echo case `getopt TRQ 'What shall we do now: ry again, econfigure, uit'` in T) return;; R) menu_main;; Q) exit 1;; esac } warn() { msg=$1 cls echo "Oops, I am in trouble here! The problem was:" echo ">> $msg <<" echo case `getopt CQ 'What shall we do now: continue, uit'` in C) return;; Q) exit 1;; esac } fatal() { echo; echo echo "ERROR: $@." echo "This was a fatal error, my friend. Installation aborted." exit 1 } show_error() { test $? = 0 && return cls echo 'WARNING: the last command returned an error.' if yesno 'Do you want to see the errorlog'; then cat $ERRLOG | $PAGER readln fi cls } # this is a hard job... trying to anticipiate trouble... sanity_checks() { while test -d $TMPDIR; do tra "temporal directory $TMPDIR already exists" done while test -d $TETEXDIR; do tra "directory TETEXDIR=$TETEXDIR already exists" done while test -d $TEXMF; do tra "directory TEXMF=$TEXMF already exists" done while test "$opt_symlink" = X && test ! -z "$opt_symlinks_bin" && test -d "$opt_symlinks_bin" && test ! -w "$opt_symlinks_bin"; do tra "cannot write to directory $opt_symlinks_bin" done while test "$opt_symlink" = X && test ! -z "$opt_symlinks_man" && test -d "$opt_symlinks_man" && test ! -w "$opt_symlinks_man"; do tra "cannot write to directory $opt_symlinks_man" done while test "$opt_symlink" = X && test ! -z "$opt_symlinks_info" && test -d "$opt_symlinks_info" && test ! -w "$opt_symlinks_info"; do tra "cannot write to directory $opt_symlinks_info" done while test ! -z "$opt_varfonts_dir" && test -d "$opt_varfonts_dir" && test ! -w "$opt_varfonts_dir"; do tra "cannot write to directory $opt_varfonts_dir" done } prepare_directories() { trap 'cd /; rm -rf "$TMPDIR"; rm -f "$TEXMF" "$ERRLOG" 2>/dev/null; trap '' 0; exit 0' 0 1 2 15 alldirs="$TMPDIR $TETEXDIR $TEXMF $opt_symlinks_bin $opt_symlinks_info" test -z "$opt_symlinks_man" || alldirs="$alldirs $opt_symlinks_man/man1 $opt_symlinks_man/man5 $opt_symlinks_man/cat1 $opt_symlinks_man/cat5" test -z "$opt_varfonts_dir" || alldirs="$alldirs $opt_varfonts_dir/pk $opt_varfonts_dir/tfm" for dir in $alldirs; do while test ! -d $dir || test ! -w $dir; do mkdirhier $dir test -d $dir || { tra "could not make directory '$dir'"; continue; } test -w $dir || { tra "cannot write to directory '$dir'"; continue; } done done chmod 700 $TMPDIR || fatal "command 'chmod 700 $TMPDIR' failed" test -z "$opt_varfonts_dir" || chmod 1777 $opt_varfonts_dir/pk $opt_varfonts_dir/tfm || fatal "command 'chmod 1777 $opt_varfonts_dir/pk $opt_varfonts_dir/tfm' failed" ln -s $TETEXDIR $TMPDIR/$tetex_prefix test -d $TETEXDIR/texmf || ln -s $TEXMF $TETEXDIR/texmf platform_subdir_strip=false if test $s_bin_ns = 1; then cls textvar_show screen_6 echo if yesno 'Do you want to omit the extra subdirectory'; then platform_subdir_strip=true mkdir $TETEXDIR/bin for pd_p in $s_bin_lf; do if eval \$p_${pd_p}_s; then eval platform_subdir_strip_d=\$p_${pd_p}_d break fi done ln -s . $TETEXDIR/bin/$platform_subdir_strip_d fi fi mkdirhier $TEXMF/lists } opt_do_symlinks() { test "$opt_symlinks" = X || return $echon 'Creating symbolic links... ' if test -d $TETEXDIR/man/man1 && test -w $opt_symlinks_man/man1; then cd $opt_symlinks_man/man1 rm -f `ls $TETEXDIR/man/man1`; ln -s $TETEXDIR/man/man1/* . fi if test -d $TETEXDIR/man/man5 && test -w $opt_symlinks_man/man5; then cd $opt_symlinks_man/man5 rm -f `ls $TETEXDIR/man/man5`; ln -s $TETEXDIR/man/man5/* . fi if test -d $TETEXDIR/man/cat1 && test -w $opt_symlinks_man/cat1; then cd $opt_symlinks_man/cat1 rm -f `ls $TETEXDIR/man/cat1`; ln -s $TETEXDIR/man/cat1/* . fi if test -d $TETEXDIR/man/cat5 && test -w $opt_symlinks_man/cat5; then cd $opt_symlinks_man/cat5 rm -f `ls $TETEXDIR/man/cat5`; ln -s $TETEXDIR/man/cat5/* . fi if test -d $TETEXDIR/info && test -w "$opt_symlinks_info"; then cd $opt_symlinks_info rm -f `ls $TETEXDIR/info`; ln -s $TETEXDIR/info/*info* . fi if test "$opt_symlinks" = X; then if test ! -z "$this_platform_bin"; then if test -w "$opt_symlinks_bin"; then cd $opt_symlinks_bin rm -f `ls $this_platform_bin`; ln -s $this_platform_bin/* . echo 'Done.' fi else cls echo ' WARNING! ' echo echo 'teTeX binaries for this platform are not installed. If you install' echo 'them later, you can create symbolic links to $opt_symlinks_bin' echo 'with a command like:' echo echo " ln -s $TETEXDIR/bin/PLATFORM/* $opt_symlinks_bin" echo echo 'PLATFORM needs to be replaced by the name of the subdirectory that' echo 'contains the binaries for this platform.' echo readln fi fi } locate_binaties() { this_platform_bin= lb_dir=$TETEXDIR/bin/$this_platform_d test -x "$lb_dir/initex" && this_platform_bin=$lb_dir test -x "$TETEXDIR/bin/initex" && this_platform_bin=$TETEXDIR/bin test ! -d $lb_dir && rm -f $lb_dir 2>/dev/null test -z "$this_platform_bin" && return PATH="${this_platform_bin}:${PATH}"; export PATH } untgz() { cd $TMPDIR for u_series in $S_all_la; do eval selected=\$s_${u_series}_ls for u_package in $selected; do eval file=\$p_${u_package}_fn list=`basename $file| sed 's@.tar.gz$@@'` package_showinfo $u_package echo $echon "Testing integrity of file $file... " gzip --test $file if test $? = 0; then echo "Ok." else warn "Integrity of file $file is void." continue fi $echon "Extracting package $p_current_n... " gzip -dc < $file | tar -xvf - >$ERRLOG 2>&1 if test $? = 0; then echo 'Done.' sed /$tetex_prefix/'!d; s@[^/]*'$tetex_prefix'/*@@; s/[,/]*[ ].*//; /^$/d' $ERRLOG > $TEXMF/lists/$list if test -s $TEXMF/lists/$list; then chmod 755 $TEXMF/lists/$list else rm -f $TEXMF/lists/$list fi else show_error continue fi done done rmdir $TEXMF/lists 2>/dev/null } prepare_errorlog() { trap 'cd /; rm -f "$ERRLOG" 2>/dev/null; trap '' 0; exit 0' 0 1 2 15 touch "$ERRLOG" test -w "$ERRLOG" || fatal "cannot write to file '$ERRLOG'" } locate_binaries() { require_binaries touch sed awk gzip ln rm ls tar tr mkdir cat `echo $PAGER | sed 's@ .*@@'` pwd } init() { bad_sh prepare_errorlog locate_binaries find_echo unset_vars this_platform=`platform_guess` series_init nobin_stat } linux_which_x() { test -f $TETEXDIR/bin/i486-linuxaout/xdvi-X11R6 || return test -f $TETEXDIR/bin/i486-linuxaout/xdvi-X11R5 || return test -f $TETEXDIR/bin/i486-linuxaout/virmf-X11R5 || return test -f $TETEXDIR/bin/i486-linuxaout/virmf-X11R6 || return echo 'The a.out binaries for Linux contains 2 versions of xdvi and virmf.' echo 'One is for X11R5 (XFree86-2.X), the other one for X11R6 (XFree86-3.X).' echo rm -f $TETEXDIR/bin/i486-linuxaout/xdvi.bin $TETEXDIR/bin/i486-linuxaout/virmf.X if yesno 'Do you want to use the R6 versions as default'; then ln -s xdvi-X11R6 $TETEXDIR/bin/i486-linuxaout/xdvi.bin ln -s virmf-X11R6 $TETEXDIR/bin/i486-linuxaout/virmf.X other=X11R5 else ln -s xdvi-X11R5 $TETEXDIR/bin/i486-linuxaout/xdvi.bin ln -s virmf-X11R5 $TETEXDIR/bin/i486-linuxaout/virmf.X other=X11R6 fi if yesno "Remove the binaries for $other"; then rm -f $TETEXDIR/bin/i486-linuxaout/xdvi-$other rm -f $TETEXDIR/bin/i486-linuxaout/virmf-$other fi } fixperm() { $echon 'Fixing permissions... ' cd $TEXMF files=`find . -perm -2 \( -type d -o -type f \) -print` test -z "$files" || chmod go-w $files cd $TETEXDIR files=`find . -perm -2 \( -type d -o -type f \) -print` test -z "$files" || { chmod go-w $files 2>$ERRLOG; show_error; } dirs=`find $TEXMF/fonts/tfm $TEXMF/fonts/pk -type d -print 2>$ERRLOG` test -z "$dirs" || { chmod 1777 $dirs 2>$ERRLOG; show_error; } test -f $TEXMF/ls-R && { chmod 666 $TEXMF/ls-R 2>$ERRLOG; show_error; } echo 'Done.' } install_now() { umask 022 cls; sanity_checks cls; prepare_directories umask 0 cls; untgz cls; fixperm umask 022 cls; linux_which_x cls; locate_binaties cls; man_fix_texmf cls; opt_do_symlinks cls; texmfcnf_fix_texmf cls; texmfcnf_fix_tetexdir cls; update cls; init_tetex cls if test ! -z "$this_platform_bin"; then if test -z "$opt_symlinks_bin"; then bin=$this_platform_bin else bin=$opt_symlinks_bin fi cat < $TEXMF/ls-R (cd $TEXMF; ls -LAR ./ /dev/null 2>$ERRLOG) >> $TEXMF/ls-R show_error chmod 666 $TEXMF/ls-R echo 'Done.' if test ! -z "$this_platform_bin"; then test "$debug" = true && { set; sleep 5; } $echon 'Creating mf.base and tex format files... ' eval TEXMF=$TEXMF $this_platform_bin/texconfig init >$ERRLOG 2>&1 show_error echo 'Done.' fi } init_tetex() { tetex_dump maketex_setopt } update() { test "$opt_update" = X || return echo "locating files for update option... " update_get_texmf if test -d "$opt_update_oldtexmf"; then echo " old TEXMF: $opt_update_oldtexmf" else echo " old TEXMF: not found" fi update_get_xdvi_ad if test -f "$opt_update_xdviad"; then echo " old app-defaults file for xdvi: $opt_update_xdviad" rm -f $TEXMF/xdvi/XDvi cp "$opt_update_xdviad" $TEXMF/xdvi/XDvi else echo " old app-defaults file for xdvi: not found" fi if test -d "$opt_update_oldtexmf/dvips"; then echo " old dvips config files: $opt_update_oldtexmf/dvips" (cd $TEXMF/dvips && rm -f `cd "$opt_update_oldtexmf/dvips"; ls config.*`) cp $opt_update_oldtexmf/dvips/config.* $TEXMF/dvips else echo " old dvips config files: not found" fi } update_get_texmf() { opt_update_oldtexmf=`sed -n '/^TEXMF[ ]*=/!d; s/.*=[ ]*//; s/[ ].*//; s@\$TETEXDIR@'$opt_update_olddir'@; p' $opt_update_olddir/texmf.cnf 2>/dev/null` test ! -d "$opt_update_oldtexmf" && opt_update_oldtexmf="$opt_update_olddir/texmf" } update_get_xdvi_ad() { opt_update_xdviad=`find $opt_update_olddir/xdvi* $opt_update_oldtexmf \( -name XDvi -o -name XDvi.ad \) -print | sed q 2>/dev/null` test ! -f "$opt_update_xdviad" && opt_update_xdviad= } ################################################################ # menus: ################################################################ menu_main() { while true; do cls opt_savespace_man=X test "$opt_savespace_man_rm" = X || test "$opt_savespace_man_gzip" = X || opt_savespace_man=' ' textvar_show screen_1; echo case `getopt PSDOIHQ 'Enter command'` in P) menu_platform;; S) menu_series;; D) menu_directories;; O) menu_options;; I) install_now;; H) help help_1;; Q) exit_on_confirm;; esac done } # NEW PLATFORM: change getopt call and add a new case. menu_platform() { while true; do cls textvar_show screen_5; echo case `getopt N123456789ABCDRQ 'Select the platform you are currently on'` in N) this_platform_set '';; 1) this_platform_set $platform_1;; 2) this_platform_set $platform_2;; 3) this_platform_set $platform_3;; 4) this_platform_set $platform_4;; 5) this_platform_set $platform_5;; 6) this_platform_set $platform_6;; 7) this_platform_set $platform_7;; 8) this_platform_set $platform_8;; 9) this_platform_set $platform_9;; A) this_platform_set $platform_A;; B) this_platform_set $platform_B;; C) this_platform_set $platform_C;; D) menu_platform_BSD;; R) return;; Q) exit_on_confirm;; esac done } menu_platform_BSD() { while true; do cls textvar_show screen_BSD; echo case `getopt N12345RQ 'Select the platform you are currently on'` in N) this_platform_set '';; 1) this_platform_set $platform_BSD_1;; 2) this_platform_set $platform_BSD_2;; 3) this_platform_set $platform_BSD_3;; 4) this_platform_set $platform_BSD_4;; 5) this_platform_set $platform_BSD_5;; R) return;; Q) exit_on_confirm;; esac done } menu_directories() { while true; do cls textvar_show screen_2; echo case `getopt 12RQ 'Enter command'` in 1) gets TETEXDIR; TETEXDIR=`dirname "$TETEXDIR/x" | sed 's@//*@/@g'` TEXMF=`echo $TETEXDIR/texmf | sed 's@//*@/@g'`;; 2) gets TEXMF; TEXMF=`dirname "$TEXMF/x" | sed 's@//*@/@g'`;; R) return;; Q) exit_on_confirm;; esac done } menu_options() { while true; do cls textvar_show screen_3; echo case `getopt ASMCRQ 'Enter command'` in A) toggle opt_varfonts if test "$opt_varfonts" = X; then cls; textvar_show screen_3; echo opt_varfonts_dir=$opt_varfonts_dir_last test -z "$opt_varfonts_dir" && opt_varfonts_dir=/var/texfonts gets opt_varfonts_dir 'alternate directory' else opt_varfonts_dir_last=$opt_varfonts_dir opt_varfonts_dir='' fi ;; S) toggle opt_symlinks if test "$opt_symlinks" = X; then cls; textvar_show screen_3; echo opt_symlinks_bin=$opt_symlinks_bin_last test -z "$opt_symlinks_bin" && opt_symlinks_bin=/usr/local/bin gets opt_symlinks_bin 'binary directory' opt_symlinks_man=$opt_symlinks_man_last test -z "$opt_symlinks_man" && opt_symlinks_man=`dirname $opt_symlinks_bin`/man gets opt_symlinks_man 'man directory ' opt_symlinks_info=$opt_symlinks_info_last test -z "$opt_symlinks_info" && opt_symlinks_info=`dirname $opt_symlinks_bin`/info gets opt_symlinks_info 'info directory ' else opt_symlinks_bin_last=$opt_symlinks_bin opt_symlinks_man_last=$opt_symlinks_man opt_symlinks_info_last=$opt_symlinks_info opt_symlinks_bin=''; opt_symlinks_man=''; opt_symlinks_info='' fi ;; M) cls; textvar_show screen_3; echo opt_savespace_man=' ' opt_savespace_man_rm=' ' opt_savespace_man_gzip=' ' yesno 'remove nroff sources' && { opt_savespace_man_rm=X; opt_savespace_man=X; } yesno 'compress preprocessed manpages with gzip' && { opt_savespace_man_gzip=X; opt_savespace_man=X; } ;; C) toggle opt_update if test "$opt_update" = X; then cls; textvar_show screen_3; echo opt_update_olddir=$opt_update_olddir_last test -z "$opt_update_olddir" && test -f /usr/local/tex/texmf.cnf && opt_update_olddir=/usr/local/tex gets opt_update_olddir 'old TETEXDIR' test -f $opt_update_olddir/texmf.cnf && continue echo "File $opt_update_olddir/texmf.cnf does not exist." readln opt_update=' ' opt_update_olddir='' else opt_update_olddir_last=$opt_update_olddir opt_update_olddir='' fi ;; R) return;; Q) exit_on_confirm;; esac done } menu_series() { while true; do cls textvar_show screen_4; echo menu_series_ans=`getopt PBGFDRQ 'Enter command'` case "$menu_series_ans" in P) series=bin;; B) series=base;; G) series=goodies;; F) series=fonts;; D) series=doc;; esac case "$menu_series_ans" in [PBGFD]) cls; textvar_show screen_4; textvar_show s_${series}_h; echo case `getopt ANSLC "install series $series ([A]ll, [N]o, [S]elect, [L]ist, [C]ancel)"` in A) series_select_all $series; nobin_stat;; N) series_deselect_all $series; nobin_stat;; S) series_usersetup $series; nobin_stat;; L) series_list $series;; C) : ;; esac;; R) return;; Q) exit_on_confirm;; esac done } package_showinfo() { p=$1 cls eval p_current_du=\$p_${p}_du eval p_current_n=\$p_${p}_n eval p_current_l=\$p_${p}_l eval p_current_v=\$p_${p}_v echo "Package: $p_current_n" echo "Series: $series" if [ ! -z "$p_current_v" ] ; then echo "Version: $p_current_v" fi echo "Status: $p_current_l" echo "Disk space: $p_current_du" textvar_show p_${p}_h } series_usersetup() { su_series=$1 eval all_packages=\"\$s_${su_series}_lf\" for p in $all_packages; do package_showinfo $p echo p_current_s=false yesno "install package $p_current_n" && p_current_s=true eval p_${p}_s=$p_current_s done series_stat $su_series } exit_on_confirm() { cls yesno 'Really quit' && exit } ################################################################ # global variables ################################################################ VERSION=0.3.3 # prefix in the archives: tetex_prefix=teTeX TETEXDIR=/usr/local/$tetex_prefix TEXMF=$TETEXDIR/texmf man_texmf_old_fallback=$TEXMF man_tetexdir_old_fallback=$TETEXDIR TMPDIR=${TMP-/tmp}/inst.tmp.$$ ERRLOG=${TMP-/tmp}/inst.errlog.$$ : ${PAGER=more} mt_site_loc=maketex/maketex.site here=`pwd` envvars=' BIBINPUTS BSTINPUTS DVIPSHEADERS GFFONTS GLYPHFONTS MFBASES MFINPUTS MFPOOL PKFONTS TEXCONFIG TEXFONTS TEXFORMATS TEXINPUTS TEXMFCNF TEXPICTS TEXPKS TEXPOOL TFMFONTS VFFONTS DVIPSFONTS XDVIVFS XDVIFONTS DVILJFONTS ' opt_varfonts=' ' opt_varfonts_dir='' opt_varfonts_dir_last='' opt_symlinks=' ' opt_symlinks_bin='' opt_symlinks_man='' opt_symlinks_info='' opt_symlinks_bin_last='' opt_symlinks_man_last='' opt_symlinks_info_last='' opt_savespace_man=' ' opt_savespace_man_rm=' ' opt_savespace_man_gzip=' ' opt_update=' ' opt_update_olddir='' opt_update_olddir_last='' this_platform= S_nobin_la='base goodies fonts doc' S_all_la="$S_nobin_la bin" ############################################################################# # The supported binaries. Add new platforms to the s_bin_la list and create # a p_PLATFORM st structure with the following variables: # _d: the directory name below bin for this platform # _du: disk usage # _n: name of the package # -h: help text ############################################################################# # NEW PLATFORM: add identifier. platform_1=i486_linux platform_2=i486_linuxaout platform_3=m68k_linux platform_4=m68k_linuxaout platform_5=mips_irix53 platform_6=rs6000_aix32 platform_7=sparc_solaris24 platform_8=sparc_sunos413 platform_9=hppa11_hpux901 platform_A=alpha_osf20 platform_B=alpha_osf32 platform_C=mips_ultrix_44 platform_D=BSD platform_BSD_1=i386_bsdi20 platform_BSD_2=i386_netbsd10 platform_BSD_3=i386_netbsd11 platform_BSD_4=i386_freebsd205 platform_BSD_5=i386_freebsd210 # NEW PLATFORM: add entry in s_bin_la variable. s_bin_la='i486_linux i486_linuxaout m68k_linux m68k_linuxaout mips_irix53 rs6000_aix32 sparc_solaris24 sparc_sunos413 hppa11_hpux901 alpha_osf20 alpha_osf32 mips_ultrix_44 i386_bsdi20 i386_netbsd10 i386_netbsd11 i386_freebsd205 i386_freebsd210 ' s_bin_n=binaries s_bin_d=binaries s_bin_h=' This series contains the binaries for teTeX. There is one binary package for each supported platform containing all teTeX binaries for that platform. ' # NEW PLATFORM: add p_*_{l,d,du,n,h} variables. p_i386_freebsd210_l='optional' p_i386_freebsd210_d='i386-freebsd2.1.0' p_i386_freebsd210_du='3440' p_i386_freebsd210_n='FreeBSD/i386 2.1.0' p_i386_freebsd210_h=' This package contains all binaries for FreeBSD/i386 2.1.0 platforms. ' p_i386_freebsd205_l='optional' p_i386_freebsd205_d='i386-freebsd2.0.5' p_i386_freebsd205_du='3440' p_i386_freebsd205_n='FreeBSD/i386 2.0.5' p_i386_freebsd205_h=' This package contains all binaries for FreeBSD/i386 2.0.5 platforms. ' p_i386_bsdi20_l='optional' p_i386_bsdi20_d='i386-bsdi2.0' p_i386_bsdi20_du='6950' p_i386_bsdi20_n='BSDI/i386 2.0' p_i386_bsdi20_h=' This package contains all binaries for BSDI/i386 2.0 platforms. ' p_i386_netbsd11_l='optional' p_i386_netbsd11_d='i386-netbsd1.1' p_i386_netbsd11_du='4689' p_i386_netbsd11_n='NetBSD/i386 1.1' p_i386_netbsd11_h=' This package contains all binaries for NetBSD/i386 1.1 platforms. ' p_i386_netbsd10_l='optional' p_i386_netbsd10_d='i386-netbsd1.0' p_i386_netbsd10_du='3571' p_i386_netbsd10_n='NetBSD/i386 1.0' p_i386_netbsd10_h=' This package contains all binaries for NetBSD/i386 1.0 platforms. ' p_mips_ultrix_44_l='optional' p_mips_ultrix_44_d='mips-ultrix4.4' p_mips_ultrix_44_du='7920' p_mips_ultrix_44_n='Mips ULTRIX 4.4 (RISC)' p_mips_ultrix_44_h=' This package contains all binaries for Mips ULTRIX 4.4 (RISC) platforms. ' p_m68k_linuxaout_l='optional' p_m68k_linuxaout_d='m68k-linuxoldld' p_m68k_linuxaout_du='2780' p_m68k_linuxaout_n='Linux 68k (a.out)' p_m68k_linuxaout_h=' This package contains all binaries for Linux 68k (a.out) platforms. ' p_m68k_linux_l='optional' p_m68k_linux_d='m68k-linux' p_m68k_linux_du='2720' p_m68k_linux_n='Linux 68k (ELF)' p_m68k_linux_h=' This package contains all binaries for Linux 68k (ELF) platforms. The binaries are in ELF format and need ld.so version 1.7.3 or higher and libc version 5.0.9 or higher. ' p_alpha_osf32_l='optional' p_alpha_osf32_d='alpha-osf3.2' p_alpha_osf32_du='6150' p_alpha_osf32_n='DEC OSF/1 V3.2 Alpha-AXP' p_alpha_osf32_h=' This package contains all binaries for DEC OSF/1 V3.2 Alpha-AXP platforms. ' p_alpha_osf20_l=optional p_alpha_osf20_d=alpha-osf2.0 p_alpha_osf20_du=6251 p_alpha_osf20_n='DEC OSF/1 V2.0 Alpha' p_alpha_osf20_h=' This package contains all binaries for DEC OSF/1 V2.0 Alpha platforms. ' p_hppa11_hpux901_l=optional p_hppa11_hpux901_d=hppa1.1-hpux9.01 p_hppa11_hpux901_du=5767 p_hppa11_hpux901_n='HP-UX 9.01 9000/710' p_hppa11_hpux901_h=' This package contains all binaries for HP-UX 9.01 9000/710 platforms. ' p_i486_linux_l=optional p_i486_linux_d=i486-linux p_i486_linux_du=2976 p_i486_linux_n='Linux Intel x86 (ELF)' p_i486_linux_h=' This package contains all binaries for Linux on x86 machines. The binaries are in ELF format and need ld.so version 1.7.3 or higher and libc version 5.0.9 or higher. ' p_i486_linuxaout_l=optional p_i486_linuxaout_d=i486-linuxaout p_i486_linuxaout_du=3295 p_i486_linuxaout_n='Linux Intel x86 (a.out)' p_i486_linuxaout_h=' This package contains all binaries for Linux on x86 machines. The binaries are in the old a.out format and need version 4 of the C library (e.g. libc-4.6.26). ' p_mips_irix53_l=optional p_mips_irix53_d=mips-irix5.3 p_mips_irix53_du=7038 p_mips_irix53_n='SGI Irix 5.3' p_mips_irix53_h=' This package contains all binaries for SGI Indigo machines running Irix-5.3. ' p_rs6000_aix32_l=optional p_rs6000_aix32_d=rs6000-aix3.2 p_rs6000_aix32_du=4604 p_rs6000_aix32_n='IBM RS6000 AIX 3.2' p_rs6000_aix32_h=' This package contains all binaries for IBM RS600 machines running AIX 3.2. ' p_sparc_solaris24_l=optional p_sparc_solaris24_d=sparc-solaris2.4 p_sparc_solaris24_du=4078 p_sparc_solaris24_n='SUN Sparc Solaris 2.4' p_sparc_solaris24_h=' This package contains all binaries for SUN Sparcs running Solaris 2.4. ' p_sparc_sunos413_l=optional p_sparc_sunos413_d=sparc-sunos4.1.3 p_sparc_sunos413_du=4435 p_sparc_sunos413_n='SUN Sparc SunOS 4.1.3' p_sparc_sunos413_h=' This package contains all binaries for SUN Sparcs running SunOS 4.1.3. ' s_base_n=base s_base_d=base s_base_h=' This series contains the most basic packages that are needed for the basic functionality of teTeX and a minimal LaTeX system. ' s_base_la='tetex_base latex_base' s_goodies_n=goodies s_goodies_d=goodies s_goodies_la='latex_extra amstex bibtex xtexsh pictex' s_goodies_h=' This series contains some additional packages: XTeXShell, AMSTeX, PiCTeX, BibTeX and LaTeX-extra. Note that most LaTeX add-ons are contained in the LaTeX-extra package of this series. ' s_fonts_n=fonts s_fonts_d=fonts s_fonts_la='dc_fonts gothic_fonts pandora_fonts urw_fonts wasy_fonts adobe_fonts ams_fonts bitstrea_fonts concrete_fonts' s_fonts_h=' This series contains font packages: DC, oldgerman, pandora, wasy, AMS, concrete and support for PostScript fonts from URW, Bitstream and Adobe. ' s_doc_n=documentation s_doc_d=doc s_doc_la='dcfonts_doc eplain_doc general_doc german_doc fontname_doc latex_doc oldgerman_doc texdraw_doc ams_doc programs_doc babel_doc bibtex_doc makeindex_doc' s_doc_h=' This series contains a lot of documentation about teTeX and the packages it contains. The whole series contains over 100 dvi files plus TeX-FAQ and some other documentation. ' ############################################################################# # packages: ############################################################################# p_latex_base_l=required p_tetex_base_l=required p_ams_doc_l=optional p_babel_doc_l=optional p_bibtex_doc_l=optional p_dcfonts_doc_l=optional p_eplain_doc_l=optional p_fontname_doc_l=optional p_general_doc_l=recommended p_german_doc_l=optional p_programs_doc_l=recommended p_latex_doc_l=recommended p_makeindex_doc_l=optional p_oldgerman_doc_l=optional p_texdraw_doc_l=optional p_adobe_fonts_l=optional p_ams_fonts_l=recommended p_bitstrea_fonts_l=optional p_concrete_fonts_l=optional p_dc_fonts_l=recommended p_gothic_fonts_l=optional p_pandora_fonts_l=optional p_urw_fonts_l=optional p_wasy_fonts_l=recommended p_amstex_l=optional p_pictex_l=optional p_bibtex_l=recommended p_latex_extra_l=recommended p_xtexsh_l=optional p_latex_base_d=latex-base p_latex_base_du=1360 p_latex_base_n='LaTeX base' p_latex_base_v='<1995/06/01> patch level 3' p_latex_base_h=' This package contains a minimal set of macros to use the LaTeX format. If you really want to use LaTeX regularly, you should install the LaTeX extra package as well. ' p_tetex_base_d=tetex-base p_tetex_base_du=4315 p_tetex_base_n='teTeX base' p_tetex_base_h=' This package contains the most basic input files for teTeX: runtime configuration files, hyphenation tables, manpages and the computer modern fonts. ' p_ams_doc_d=ams-doc p_ams_doc_du=675 p_ams_doc_n='AMS documentation' p_ams_doc_h=' This package contains documentation for the AMS (= american mathematical society) fonts, AMSLaTeX and AMSTeX. A good thing, if you need lots of math in your documents. ' p_babel_doc_d=babel-doc p_babel_doc_du=805 p_babel_doc_n='Babel documentation' p_babel_doc_h=' This package contains documentation for the babel system. Babel is a package to support multiple languages in plain TeX and LaTeX. ' p_bibtex_doc_d=bibtex-doc p_bibtex_doc_du=165 p_bibtex_doc_n='BibTeX documentation' p_bibtex_doc_h=' This package contains documentation for the BibTeX programm. BibTeX is a tool to make a bibliography for (La)TeX. ' p_dcfonts_doc_d=dcfonts-doc p_dcfonts_doc_du=45 p_dcfonts_doc_n='DC fonts documentation' p_dcfonts_doc_h=' This package contains documentation about the DC fonts (in french, english, german) and about the Corc encoding (in german). ' p_eplain_doc_d=eplain-doc p_eplain_doc_du=360 p_eplain_doc_n='eplain documentation' p_eplain_doc_h=' This package contains documentation for the extended plain format (eplain). ' p_fontname_doc_d=fontname-doc p_fontname_doc_du=220 p_fontname_doc_n='Filenames for TeX Fonts' p_fontname_doc_v=1.94 p_fontname_doc_h=' This package contains the \"Filenames for TeX Fonts\" document from Karl Berry. It describes a scheme to find filenames for font files. ' p_general_doc_d=general-doc p_general_doc_du=679 p_general_doc_n='General documentation' p_general_doc_h=' This package contains some general information about TeX: the TeX-FAQ, a list of ftp servers and a draft for the TeX Directory Standard (TDS). ' p_german_doc_d=german-doc p_german_doc_du=710 p_german_doc_n='german documentation' p_german_doc_h=' This package contains some documentation in german about: letter styles (dinbrief, g-brief), LaTeX packages (koma-script, script, picinpar, german.sty) and a short introduction into LaTeX2e. ' p_programs_doc_d=programs-doc p_programs_doc_du=658 p_programs_doc_n='Kpathsea documentation' p_programs_doc_h=' This package contains documentation about the Kpathsea library and some programmes (dvipsk, info, makeinfo). The Kpathsea library is used by some programmes in teTeX to locate files on the disk. Its most important features are the filename database (ls-R) (speeds up recursive directory searches), runtime configuration (search paths can be set up in file) and automatic font generation. ' p_latex_doc_d=latex-doc p_latex_doc_du=3255 p_latex_doc_n='LaTeX documentation' p_latex_doc_h=' This package contains documentation for LaTeX: over 70 dvi files and some examples. ' p_makeindex_doc_d=makeindex-doc p_makeindex_doc_du=110 p_makeindex_doc_n='Makeindex documentation' p_makeindex_doc_h=' This package contains documentation for the Makeindex program. ' p_oldgerman_doc_d=oldgerman-doc p_oldgerman_doc_du=45 p_oldgerman_doc_n='oldgerman documentation' p_oldgerman_doc_h=' This package contains documentation for some old german fonts. ' p_texdraw_doc_d=texdraw-doc p_texdraw_doc_du=270 p_texdraw_doc_n='TeXdraw documentation' p_texdraw_doc_h=' This package contains documentation for the TeXdraw package. It allows to use PostScript graphics within TeX documents. ' p_adobe_fonts_d=adobe-fonts p_adobe_fonts_du=2810 p_adobe_fonts_n='Adobe fonts' p_adobe_fonts_h=' This package contains support files to use some PostScript fonts from Adobe within (La)TeX. ' p_ams_fonts_d=ams-fonts p_ams_fonts_du=2180 p_ams_fonts_n='AMS fonts' p_ams_fonts_h=' This package contains the AMS fonts. ' p_bitstrea_fonts_d=bitstrea-fonts p_bitstrea_fonts_du=400 p_bitstrea_fonts_n='Bitstream fonts' p_bitstrea_fonts_h=' This package some PostScript fonts from Bitstream and support files to use them within (La)TeX. ' p_concrete_fonts_d=concrete-fonts p_concrete_fonts_du=70 p_concrete_fonts_n='Concrete fonts' p_concrete_fonts_h=' This package contains the Concrete fonts. These fonts are designed by D.E. Knuth and he used them for typesetting the book "Concrete Mathematics". ' p_dc_fonts_d=dc-fonts p_dc_fonts_du=1110 p_dc_fonts_n='DC fonts' p_dc_fonts_h=' This package contains the DC fonts. These are full 256 character fonts containing lots of national characters. ' p_gothic_fonts_d=gothic-fonts p_gothic_fonts_du=905 p_gothic_fonts_n='old german fonts' p_gothic_fonts_h=' This package contains some "old german" fonts. ' p_pandora_fonts_d=pandora-fonts p_pandora_fonts_du=335 p_pandora_fonts_n='Pandora fonts' p_pandora_fonts_h=' This package contains the Pandora fonts. ' p_urw_fonts_d=urw-fonts p_urw_fonts_du=485 p_urw_fonts_n='URW fonts' p_urw_fonts_h=' This package some PostScript fonts from URW and support files to use them within (La)TeX. ' p_wasy_fonts_d=wasy-fonts p_wasy_fonts_du=135 p_wasy_fonts_n='WASY fonts' p_wasy_fonts_h=' This package contains the symbol font WASY. ' p_amstex_du=160 p_amstex_n='AMSTeX' p_amstex_h=' This package contains the AMSTeX package. AMSTeX is an extension of the plain TeX format with better support of mathematics and easy access to the AMS fonts. ' p_pictex_d=pictex p_pictex_du=279 p_pictex_n='PiCTeX' p_pictex_h=' This package contains the PiCTeX macros to draw portable pictures with TeX and LaTeX. ' p_bibtex_du=220 p_bibtex_n='BibTeX' p_bibtex_h=' This package contains some support files for the BibTeX program. BibTeX is a tool to make a bibliography for (La)TeX. ' p_latex_extra_d=latex-extra p_latex_extra_du=2215 p_latex_extra_n='LaTeX extra' p_latex_extra_h=' This package contains a lot of extra packages for LaTeX: the tools, graphics, amslatex, mfnfss, psnfss packages and many more... ' p_xtexsh_du=1320 p_xtexsh_n='XTeXShell' p_xtexsh_h=' This package contains the XTeXShell, a system independent X-Windows shell for TeXing, where you do not need to care about program calls, operating system dependencies and other stuff. It has a built-in editor (similar to the IDE of some Borland products) and on-line help for LaTeX commands. This package requites Tcl(7.3), Tk(3.6) and TclX(7.3) to be installed. ' ################################################################ # screens: ################################################################ screen_1='====================> teTeX $VERSION installation procedure <====================

this platform: $this_platform_n series: binaries: $s_bin_ns out of $s_bin_nf, disk space required: $s_bin_dus kB other (summary): $S_nobin_ns out of $S_nobin_nf, disk space required: $S_nobin_dus kB total disk space: $s_total_dus kB directories: TETEXDIR = $TETEXDIR TEXMF = $TEXMF options: [$opt_varfonts] alternate directory for automatically generated fonts [$opt_symlinks] create symlinks in standard directories [$opt_savespace_man] save space for manpages [$opt_update] update Other commands: start installation, help, quit ' screen_2='Current directories setup: ============================================================================== <1> TETEXDIR: $TETEXDIR <2> TEXMF $TEXMF Other options: ============================================================================== return to main menu quit ' screen_3='Current options setup: ============================================================================== alternate directory for automatically generated fonts: [$opt_varfonts] directory name: $opt_varfonts_dir create symlinks in standard directories: [$opt_symlinks] binaries to: $opt_symlinks_bin manpages to: $opt_symlinks_man info to: $opt_symlinks_info save space for manpages [$opt_savespace_man] remove nroff sources [$opt_savespace_man_rm] compress preprocessed manpages with gzip [$opt_savespace_man_gzip] use configuration (xdvi/dvips) from a previous teTeX installation [$opt_update] old TETEXDIR: $opt_update_olddir Other options: ============================================================================== return to main menu quit ' screen_4='Current series setup: ==============================================================================

platforms: $s_bin_ns out of $s_bin_nf, disk space required: $s_bin_dus kB base: $s_base_ns out of $s_base_nf, disk space required: $s_base_dus kB goodies: $s_goodies_ns out of $s_goodies_nf, disk space required: $s_goodies_dus kB fonts: $s_fonts_ns out of $s_fonts_nf, disk space required: $s_fonts_dus kB doc: $s_doc_ns out of $s_doc_nf, disk space required: $s_doc_dus kB total disk space: $s_total_dus kB ============================================================================== return to main menu quit ' # NEW PLATFORM: change the screen: screen_5='Current platform: $this_platform_n ============================================================================== none of the entries below <1> $p_i486_linux_n <2> $p_i486_linuxaout_n <3> $p_m68k_linux_n <4> $p_m68k_linuxaout_n <5> $p_mips_irix53_n <6> $p_rs6000_aix32_n <7> $p_sparc_solaris24_n <8> $p_sparc_sunos413_n <9> $p_hppa11_hpux901_n $p_alpha_osf20_n $p_alpha_osf32_n $p_mips_ultrix_44_n NetBDS/FreeBSD/BSDI [...] ============================================================================== return to main menu quit ' screen_BSD='Current platform: $this_platform_n ============================================================================== none of the entries below <1> $p_i386_bsdi20_n <2> $p_i386_netbsd10_n <3> $p_i386_netbsd11_n <4> $p_i386_freebsd205_n <5> $p_i386_freebsd210_n ============================================================================== return to platform menu quit ' screen_6='teTeX can be used on multiple platforms by having a subdirectory for each installed binary package in $TETEXDIR/bin. However, if you do not plan to add binaries for other platforms to your teTeX installation, your binaries can directly be put into the $TETEXDIR/bin directory.' help_1=' This is the installation program of the teTeX distribution. The installation procedure is really simple: just go through the menus and select "start installation" if all options are set up all right. To select a menu item (a letter or a number makred with brackets) just enter the corresponding letter or number and press return (the letters are case insensitive). Right now, the each menu item is explained in detail: ====================================================================== The platform menu (

) ====================================================================== Here, you can tell the installation script, which binaries can run on your machine. If the correct platform is selected and you install the package with the binaries for that platform, the script does some post-installation steps automatically. Otherwise, the necessary commands are displayed afer the installation. You can execute these commands later, e.g. after creating the binaries by compiling the sources on your machine. ====================================================================== The series menu () ====================================================================== The series menu allows you to select and deselect packages. The packages are grouped in some series: binaries: you need one binary package for each platform you use base: this series contains a minimal TeX+LaTeX system All other series are "add-ons": goodies: useful extra stuff, including much about LaTeX fonts: many extra fonts: amsfonts, PostScript fonts, DC, ... doc: much documentation. But one cannot have enough, right? ====================================================================== The directories menu () ====================================================================== The teTeX distribution will be installed in a directory of your choice. This directory is called TETEXDIR. You may choose any directory you like since there are no absolute paths compiled into the binaries. Instead, a extension of the Kpathsea library is used (selfdir extension) and all paths are relative to the location of the binaries. The platform independend files are stored in a directory tree called TEXMF. TEXMF defaults to TETEXDIR/texmf, but you can change this, if you want (many systems use /ust/lib/texmf or /usr/local/lib/texmf) ====================================================================== The options menu () ====================================================================== The options are optional part of the installation, as they are not always applicable or useful. "alternate directory": ====================== If you choose an alternate directory for automatically generated fonts, you can mount your TEXMF tree readonly (as long as you do not want to perform administrative tasks: change configuration, install new inputs and the like). There are two good reasons to do this: - TEXMF is in your /usr partition and you want to mount it readonly (or in another partition that you mount readonly) - TEXMF will be accessable via NFS and you do not want to give write permissions to your NFS clients If the second case applies to you, please note that the filename database (ls-R) and the automatically generated fonts will be installed in the alternate directory you choose. If this directory is local to each client, you need to run texhash on each machine to build the filename database there. Another disadvantage is that new fonts are not shared in that case. "symlinks in standard directories" ================================== To make your binaries, manpages and infopages available to your system, there are two common ways: 1) install them in "standard places" that are searched for these files 2) change your search paths to include the new directories If you select the "symlinks" option, symbolic links will be installed in the directories you choose. Note that if you share the teTeX installation accross several machines via NFS and if the chosen "standard places" are not shared, you need to create the symbolic links on each client, too (or use method 2 on your clients). If you do not use the "symlinks" option, you propably need to set up your search paths (PATH, MANPATH, INFOPATH). "save space for manpages" ========================= Remove the sources for the manpages, if you do not want to keep them (the distribution contains preprocessed manpages). You may compress the preprocessed manpages with gzip, if your system supports this. "use configuration from a previous teTeX installation" ====================================================== If you have an old version of teTeX, you may consider using some configuration files from the old system and thus save the time for reconfiguring. This option supports the xdvi and dvips configuration (papertypes, modes, paper offsets for printers,...), but not your hyphenation tables for (La)TeX. ====================================================================== Other commands (, and ====================================================================== Well, this is easy to explain: starts the installation after you are confident with set setup displays this help quits the installation program ' #debug=true debug= ################################################################ # main() ################################################################ init menu_main