cabal-tweak-dep-ver: make a backup file the first time

This commit is contained in:
Jens Petersen 2012-06-22 15:21:43 +09:00
parent 1cb0fba5fb
commit 59008edb14
2 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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 <petersen@redhat.com> - 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 <petersen@redhat.com> - 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 <petersen@redhat.com> - 0.95.4-1
- new cabal-tweak-dep-ver script to tweak depends version bounds in .cabal