Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
first ebuild help
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Cicero
Apprentice
Apprentice


Joined: 21 Jul 2003
Posts: 220

PostPosted: Tue Jul 29, 2003 4:39 pm    Post subject: first ebuild help Reply with quote

I just up and decided to make an ebuild today (I've been using Gentoo for a year, so it's about time). I have everything working right now, but I have concerns about ease of maintaining (I'm just thinking of you guys :wink: ). Right now, I have to manually set a package version (using MY_PV), because the files to be downloaded don't have dots in the version. i.e. a package with version 1.2.3 has package123.zip for a file. How do I strip out the dots (I know I'm being really technical here) to set MY_PV automatically from PV? This is important, because the development branch of this package gets updated every week, and I don't think anyone wants to change MY_PV every time.
Back to top
View user's profile Send private message
Pythonhead
Developer
Developer


Joined: 16 Dec 2002
Posts: 1801
Location: Redondo Beach, Republic of Calif.

PostPosted: Tue Jul 29, 2003 6:11 pm    Post subject: Reply with quote

Code:
MY_PV=`echo ${PV} | sed -e 's/\.//g'`
Back to top
View user's profile Send private message
Cicero
Apprentice
Apprentice


Joined: 21 Jul 2003
Posts: 220

PostPosted: Tue Jul 29, 2003 6:18 pm    Post subject: Reply with quote

Heh, I was coming here to post "Nevermind. I figured it out." Well, at least now I know I did it correctly :roll:

Thanks!

Submitting ebuild for PCGen, a D&D character generator. . .
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9526
Location: beyond the rim

PostPosted: Tue Jul 29, 2003 6:20 pm    Post subject: Reply with quote

Untested:

Code:
MY_PV=${PV//.}
Back to top
View user's profile Send private message
LinuxDolt
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2003
Posts: 104

PostPosted: Wed Jul 30, 2003 2:15 am    Post subject: Reply with quote

Cicero wrote:
Well, at least now I know I did it correctly


heh, imo, there is no correct or incorrect way to do things. there are just two questions to always ask yourself:

1: does it work, and
2: does it make sense to someone else who might want to look at it.

if you can answer yah to both of those, then you are fine, if the answer is nah to either of those questions, you might want to consider something else :P
Back to top
View user's profile Send private message
Cicero
Apprentice
Apprentice


Joined: 21 Jul 2003
Posts: 220

PostPosted: Tue Aug 12, 2003 6:21 am    Post subject: Reply with quote

pcgen is in portage, and among the modifications it got on the way in, one was:
MY_PV="${PV//./}"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum