Jump to content
funtoo forums
quantum

Split atom name to atom base and atom version

Recommended Posts

Hello together,

in my new project I am reading all ebuilds from a given path and then I would like to split the filename (string) that i found to its components: atom base and atom version.

For example:

/var/git/overlay/sys-apps/portage-2.1.4_rc1

I would like to get back

Atom base: portage

Atom version: 2.1.4_rc1

It would be even better if atom version will be split to "major.minor.micro" and "rc".

Thanks for your help

 

 

Share this post


Link to post
Share on other sites

I would say that your are looking for the functionality of versionator.eclass or eapi7-ver.eclass.

versionator.eclass can be found at https://code.funtoo.org/bitbucket/projects/AUTO/repos/gentoo-staging/browse/eclass/versionator.eclass

eapi7-ver.eclass at https://code.funtoo.org/bitbucket/projects/AUTO/repos/gentoo-staging/browse/eclass/eapi7-ver.eclass

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...