Bug#267886: tetex-extra: the package doesn't install cleanly. fmtutil error
Hilmar Preusse <hille42@web.de> wrote:
>+ sed 's@^\(For use with ngerman\)@\% \1@' < $CUR_LDAT > $tempfile
I have yet written something similar - why do you escape the %?
Furthermore, I'd prefer to also catch lines where the user has added a
space or anything else before the "For", which gives:
+#
+# 2.0.2-20, 2004-08-25
+# There's one more fix to do: In some tetex-base version, we accidently
+# shipped language.dflt with a missing comment sign. If this is still
+# in language.dat, we have to fix this.
[...]
+ # now look for the missing comment sign
+ weird_pattern="For use with ngerman"
+ if grep "$weird_pattern" $CUR_LDAT | grep -v ^% >/dev/null; then
+ # this line is lacking the comment sign
+ tempfile=`mktemp`
+ sed -e "s/^\(.*$weird_pattern\)/% \1/" $CUR_LDAT > $tempfile
+ chown --reference=$CUR_LDAT $tempfile
+ chmod --reference=$CUR_LDAT $tempfile
+ mv $tempfile $CUR_LDAT
+ fi
+
--
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
Reply to: