|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Wading through sed and re_format
I'm trying to update x11/tint2 and have the basic port almost ready to go.
Where I am hung up is that upstream has provided multiple rc configuration files that contain multiple Launcher paths; ie /usr/share/applications/tint2conf.desktop and /usr/share/applications/firefox.desktop. The 12.2 source had these in a "sample" directory which in the interim has been renamed "themes". In 12.2, @sthen added a post-intall sed command to edit all the examples Code:
post-install: cp -R ${WRKSRC}/sample/ ${PREFIX}/share/examples/tint2/ sed -i -e '/\/usr\/local\/share\/applications/d' -e \ 's,/usr/share/applications,${LOCALBASE}/share/applications,g' \ ${PREFIX}/share/examples/tint2/*tint2rc rm ${PREFIX}/share/tint2/*.tint2rc In the above code does the cp -R command stream into the sed command on the next line? I understand -i is "inplace" and -e appends /\/usr\/local\/share\/applications/d' to the next command. I'm guessing that .../applications/d' "deletes the pattern space and starts the next cycle which then replaces /usr/share/applications with ${LOCALEBASE}/share/applications,g Code:
[2addr]g Replace the contents of the pattern space with the contents of the hold space. So I modified the post-install command to Code:
post-install: sed -i -e '/\/usr\/local\/share\/applications/d' -e \ 's,/usr/share/applications,${LOCALBASE}/share/applications,g' \ ${PREFIX}/share/examples/tint2/*tint2rc ***Parse Error in /usr/ports/x11/tint2: Need operator in '/share/examples/tint2/*tint2rc. sed(1) and re_format(7) are not easy reading. Both the FreeBSD(v0.14.5) and NetBSD(v0.14.6) did not address this. Any guidance appreciated. |
Thread Tools | |
Display Modes | |
|
|