On 25/10/14 05:06, Steven Haigh wrote:> I also want to go and put a custom URL in the sl6x.repo to go to my
> local repository that I mirror.
>
> That means I'd want to turn this:
[snip]

> to this:
The only change I can see was inserting your server in the baseurl.
Perhaps this is only needed in the  sl6x  section.

This bit of sed should do it:

sed -i '/\[sl6x\]/,/\[/ { /baseurl/ {
 h ; s!http:.*scientific/!https://my.internal.server/sl! ; p ;
 g ; s/baseurl=/                / } }' /etc/yum.repos.d/sl6x.repo

It is "parsing" the URL in as much as you seem to need to replicate the bit of the existing one after 'scientific/'.

Hope that helps.

   Shane

--
Shane Voss, Computing Officer, School of GeoSciences, University of Edinburgh

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply via email to