Permalink
Browse files

check_hackage_mirror.sh: changes hackage URIs to mirror links

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
1 parent 5fa2564 commit 5233b4e3fa196e49a540cd871cc907a1ea4e6ba7 @trofi committed Dec 15, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 check_hackage_mirror.sh
View
20 check_hackage_mirror.sh
@@ -0,0 +1,20 @@
+#!/bin/bash -e
+
+check_src_uri() {
+ local e=$1
+
+ echo "FIX HACKAGE SRC_URI: $e"
+ sed -e "/SRC_URI/ s,http://hackage.haskell.org/,mirror://hackage/," -i "${e}"
+}
+
+while read e; do
+ src_uri=
+
+ while read l
+ do
+ if [[ $l == *'SRC_URI="http://hackage.haskell.org'* ]]; then
+ check_src_uri "$e"
+ break
+ fi
+ done < "$e"
+done < <(find . -type f -name '*.ebuild')

0 comments on commit 5233b4e

Please sign in to comment.