simplify cabal-tweak-flag script to take one flag value

epel9
Jens Petersen 12 years ago
parent 436bfaf65d
commit 11c364e456

@ -1,25 +1,25 @@
#!/bin/sh
# TODO:
# support "$0 FLAG NEW" when no upstream default
# support setting flag when no upstream default
set -e +x
USAGE="Usage: $0 FLAG OLD NEW"
USAGE="Usage: $0 FLAG [True|False]"
if [ $# -ne 3 ]; then
if [ $# -ne 2 ]; then
echo "$USAGE"
exit 1
fi
FLAG=$1
OLD=$2
NEW=$3
if [ "$OLD" = "$NEW" ]; then
echo "Old and new value can't be the same!"
exit 1
fi
NEW=$2
case $NEW in
True) OLD=False ;;
False) OLD=True ;;
*) echo "Flag value can only be set to True or False" ; exit 1 ;;
esac
CABALFILE=$(ls *.cabal)

@ -6,7 +6,7 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 0.98
Version: 0.98.1
Release: 1%{?dist}
Summary: Macros for building packages for GHC
@ -75,6 +75,9 @@ EOF
%changelog
* Tue Jan 22 2013 Jens Petersen <petersen@redhat.com> - 0.98.1-1
- simplify cabal-tweak-flag script to take one flag value
* Mon Jan 21 2013 Jens Petersen <petersen@redhat.com> - 0.98-1
- new ghc_fix_dynamic_rpath macro for cleaning up package executables
linked against their own libraries

Loading…
Cancel
Save