DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 18th August 2017
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default 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
I'm trying to wade through this
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.
I'm not sure why "-e" is used twice on the sed line.
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
When I try to make fake, I get an error
***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.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:47 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick