1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00
freebsd-ports/print/gp/scripts/post-build
Steve Price 4e86acd9b3 Update to 2.5p2.
PR:		7690
Submitted by:	maintainer
1998-08-24 01:06:35 +00:00

42 lines
1.4 KiB
Bash

#!/bin/sh
cd ${WRKSRC}
${MV} GP GP.bak
if [ X"${LANGUAGE}" = "XEnglish" ]; then
${SED} \
-e 's@^\(set[ ]*PRINTER_LIST[ ]*\)"[^"]*"\(.*\)$@\1"%%PREFIX%%/lib/GP/printer"\2@' \
-e 's@^\(set[ ]*FILETYPE_LIST[ ]*\)"[^"]*"\(.*\)$@\1"%%PREFIX%%/lib/GP/filetype"\2@' \
-e 's@^\(set[ ]*FILTERS_DIR[ ]*\)"[^"]*"\(.*\)$@\1"%%PREFIX%%/lib/GP/filters"\2@' \
-e 's@^\(set[ ]*ICONS_PATH[ ]*\)"[^"]*"\(.*\)$@\1"%%PREFIX%%/lib/GP/icons"\2@' \
< GP.bak > GP
elif [ X"${LANGUAGE}" = "XJapanese" ]; then
${SED} \
-e 's@^\(set[ ]*PRINTER_LIST[ ]*\)"[^"]*"\(.*\)$@\1"%%PREFIX%%/lib/GP/ja/printer"\2@' \
-e 's@^\(set[ ]*FILETYPE_LIST[ ]*\)"[^"]*"\(.*\)$@\1"%%PREFIX%%/lib/GP/ja/filetype"\2@' \
-e 's@^\(set[ ]*FILTERS_DIR[ ]*\)"[^"]*"\(.*\)$@\1"%%PREFIX%%/lib/GP/ja/filters"\2@' \
-e 's@^\(set[ ]*ICONS_PATH[ ]*\)"[^"]*"\(.*\)$@\1"%%PREFIX%%/lib/GP/ja/icons"\2@' \
< GP.bak > GP
fi
${MV} GP GP.bak
${SED} \
-e "s@%%PREFIX%%@${PREFIX}@g" \
-e 's@^\(set[ ]*PS_PREVIEWER[ ]*\)"[^"]*"\(.*\)$@\1"/usr/X11R6/bin/gv"\2@' \
< GP.bak > GP
cd ${WRKSRC}/filters
if [ X"${LANGUAGE}" = "XEnglish" ]; then
for f in a2ps dvips; do
${MV} ${f} ${f}.bak
${SED} -e 's@^\(NUMBER[ ]*=\).*$@\1 1@' < ${f}.bak > ${f}
${RM} -f ${f}.bak
done
elif [ X"${LANGUAGE}" = "XJapanese" ]; then
for f in a2ps-j dvi2ps-j; do
${MV} ${f} ${f}.bak
${SED} -e 's@^\(NUMBER[ ]*=\).*$@\1 1@' < ${f}.bak > ${f}
${RM} -f ${f}.bak
done
fi