Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 890 Details for
Bug 2481
Portage Domain Name aliases
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
fix-sf-urls.sh
fix-sf-urls.sh (text/plain), 1.19 KB, created by
Sandy McArthur
on 2002-05-08 00:10:06 UTC
(
hide
)
Description:
fix-sf-urls.sh
Filename:
MIME Type:
Creator:
Sandy McArthur
Created:
2002-05-08 00:10:06 UTC
Size:
1.19 KB
patch
obsolete
>#!/bin/bash > >function errorExit() { > echo "!!!" $* > exit 1 >} > ># Check cmd line params >if [ "$#" != "2" ] >then > echo "Usage: $0 <base dir> <tmp dir>" > echo " eg: $0 /usr/portage /tmp" > errorExit "Wrong number or params." >fi > >baseDir=$1 >tmpDir=$2 > >oldUrl="http://prdownloads.sourceforge.net/" >newUrl1="http://unc.dl.sourceforge.net/sourceforge/" >newUrl2="http://telia.dl.sourceforge.net/sourceforge/" >newUrl3="http://telia.dl.sourceforge.net/sourceforge/" > ># Comment out to silence debug info >DEBUG=true > ># Find only broken ebuilds >function brokenEbuilds() { > baseDir=$1 > for x in `find $baseDir -name "*.ebuild"` > do > grep ${oldUrl} $x &> /dev/null > > if [ "$?" = "0" ] > then > echo $x > fi > done >} > >function debug() { > if [ $DEBUG ] > then > echo $* > fi >} > > >for ebuild in `brokenEbuilds ${baseDir}` >do > name=`basename ${ebuild}` > tmpFile="${tmpDir}/${name}" > > debug "Fixing ${ebuild}" > > # Match oldUrl and capture to space or " > sed -e "s|${oldUrl}\([^ \"]*\)|{$newUrl1}\1 ${newUrl2}\1 ${newUrl3}\1|" ${ebuild} > ${tmpFile} > [ "$?" != "0" ] && errorExit sed failed > > # copy tmp file back to live > cp ${tmpFile} ${ebuild} > [ "$?" != "0" ] && errorExit cp failed > > # delete tmp file > rm -f ${tmpFile} >done > >echo done.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2481
: 890