cabal-tweak-dep-ver: match complete dep name and not beyond ","

epel9
Jens Petersen 13 years ago
parent 59008edb14
commit 20cbe43332

@ -20,7 +20,9 @@ if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then
exit 1
fi
if ! grep -q "$DEP.*$OLD" $CABALFILE; then
BREAK=[^[:alnum:]-]
if ! grep -q "$BREAK$DEP$BREAK[^,]*$OLD" $CABALFILE; then
echo "$CABALFILE does not match: $DEP $OLD"
exit 1
fi
@ -29,4 +31,4 @@ if [ ! -f $CABALFILE.orig ]; then
BACKUP=.orig
fi
sed -i$BACKUP -e "s/\($DEP.*\)$OLD/\1$NEW/g" $CABALFILE
sed -i$BACKUP -e "s/\($BREAK$DEP$BREAK[^,]*\)$OLD/\1$NEW/g" $CABALFILE

@ -3,7 +3,7 @@
%global macros_file %{_sysconfdir}/rpm/macros.ghc
Name: ghc-rpm-macros
Version: 0.95.5
Version: 0.95.5.1
Release: 1%{?dist}
Summary: Macros for building packages for GHC
@ -64,6 +64,10 @@ EOF
%changelog
* Fri Jun 22 2012 Jens Petersen <petersen@redhat.com> - 0.95.5.1-1
- cabal-tweak-dep-ver: be careful only to match complete dep name and
do not match beyond ","
* Fri Jun 22 2012 Jens Petersen <petersen@redhat.com> - 0.95.5-1
- some cabal-tweak-dep-ver improvements:
- show file name when no match

Loading…
Cancel
Save