diff --git a/cabal-tweak-dep-ver b/cabal-tweak-dep-ver index 2033160..137c944 100755 --- a/cabal-tweak-dep-ver +++ b/cabal-tweak-dep-ver @@ -25,4 +25,8 @@ if ! grep -q "$DEP.*$OLD" $CABALFILE; then exit 1 fi -sed -i.$1 -e "s/\($DEP.*\)$OLD/\1$NEW/g" $CABALFILE +if [ ! -f $CABALFILE.orig ]; then + BACKUP=.orig +fi + +sed -i$BACKUP -e "s/\($DEP.*\)$OLD/\1$NEW/g" $CABALFILE diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 138596a..6d55450 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95.4.1 +Version: 0.95.5 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -64,9 +64,11 @@ EOF %changelog -* Fri Jun 22 2012 Jens Petersen - 0.95.4.1-1 -- cabal-tweak-dep-ver: show file name when no match -- cabal-tweak-dep-ver: backslash quote . and * in the match string +* Fri Jun 22 2012 Jens Petersen - 0.95.5-1 +- some cabal-tweak-dep-ver improvements: +- show file name when no match +- backslash quote . and * in the match string +- create a backup file if none exists * Fri Jun 22 2012 Jens Petersen - 0.95.4-1 - new cabal-tweak-dep-ver script to tweak depends version bounds in .cabal