head	1.1;
branch	1.1.1;
access;
symbols
	john2:1.1.1.1.0.6
	john1:1.1.1.1
	lapyu-work:1.1.1.1.0.4
	john-work:1.1.1.1.0.2
	SIXALPHA:1.1.1.1
	TEXLIVE:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2000.10.03.04.02.14;	author plaice;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.10.03.04.02.14;	author plaice;	state Exp;
branches;
next	;


desc
@@



1.1
log
@Initial revision
@
text
@#!/bin/sh

# selfautofix: change absolute paths in texmf.cnf to $SELFAUTO references.
# Copyright: 1998, Thomas Esser. Public domain.

bindir=$1
web2c=$2

test -f "$web2c"/texmf.cnf || exit 0

bindirp=`echo $bindir | sed 's%/[^/][^/]*$%%'`
bindirpp=`echo $bindirp | sed 's%/[^/][^/]*$%%'`

cd $web2c || exit 0

sedfile=sed.$$
test -n "$bindir" \
  && echo "/^[ 	]*TEXMFCNF[ =]/!s%$bindir/%\$SELFAUTOLOC/%g" > $sedfile
test -n "$bindirp" \
  && echo "/^[ 	]*TEXMFCNF[ =]/!s%$bindirp/%\$SELFAUTODIR/%g" >> $sedfile
test -n "$bindirpp" \
  && echo "/^[ 	]*TEXMFCNF[ =]/!s%$bindirpp/%\$SELFAUTOPARENT/%g" >> $sedfile

cat >>$sedfile <<eof
/^%/!s%:%;%g
/^[ 	]*TEXMFCNF[ =]/s%;%:%g
eof

sed  -f $sedfile texmf.cnf >texmf.cnf.$$
test -s texmf.cnf.$$  && cat texmf.cnf.$$ > texmf.cnf
rm -f texmf.cnf.$$ $sedfile

exit 0
@


1.1.1.1
log
@sun2.dante.de download 2/10/2000 of TeXLive (Omega 1.11)
@
text
@@
