/[gentoo-x86]/eclass/haskell-cabal.eclass
Gentoo

Diff of /eclass/haskell-cabal.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.36 Revision 1.37
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.36 2012/11/19 20:35:16 slyfox Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.37 2012/11/19 21:27:56 slyfox Exp $
4 4
5# @ECLASS: haskell-cabal.eclass 5# @ECLASS: haskell-cabal.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Haskell herd <haskell@gentoo.org> 7# Haskell herd <haskell@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
578 orig_c=$(< "$cf") 578 orig_c=$(< "$cf")
579 579
580 while :; do 580 while :; do
581 from_pat=$1 581 from_pat=$1
582 to_str=$2 582 to_str=$2
583 einfo "CHDEP: '${from_pat}' -> '${to_str}'"
584 583
585 [[ -n ${from_pat} ]] || break 584 [[ -n ${from_pat} ]] || break
586 [[ -n ${to_str} ]] || die "'${from_str}' does not have 'to' part" 585 [[ -n ${to_str} ]] || die "'${from_str}' does not have 'to' part"
586
587 einfo "CHDEP: '${from_pat}' -> '${to_str}'"
587 588
588 # escape pattern-like symbols 589 # escape pattern-like symbols
589 from_pat=${from_pat//\*/\\*} 590 from_pat=${from_pat//\*/\\*}
590 from_pat=${from_pat//\[/\\[} 591 from_pat=${from_pat//\[/\\[}
591 592
595 echo "${orig_c}" >"${T}/${cf}".pre 596 echo "${orig_c}" >"${T}/${cf}".pre
596 echo "${new_c}" >"${T}/${cf}".post 597 echo "${new_c}" >"${T}/${cf}".post
597 diff -u "${T}/${cf}".{pre,post} 598 diff -u "${T}/${cf}".{pre,post}
598 fi 599 fi
599 600
600 [[ "${orig_c}" == "${new_c}" ]] && die "no trigger for '${from_ss}'" 601 [[ "${orig_c}" == "${new_c}" ]] && die "no trigger for '${from_pat}'"
601 orig_c=${new_c} 602 orig_c=${new_c}
602 shift 603 shift
603 shift 604 shift
604 done 605 done
605 606

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.20