From 18fd461ac2a4d8ab9de1533889690fc0d2e003ff Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 11 Feb 2023 14:50:57 +0800 Subject: [PATCH] make ghc-dep.sh and ghc-pkg-wrapper error if error occurs --- ghc-deps.sh | 4 ++-- ghc-pkg-wrapper | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index ee48af6..5476772 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -1,9 +1,9 @@ #!/bin/sh # find rpm provides and requires for Haskell GHC libraries -[ $# -lt 2 ] && echo "Usage: $(basename "$0") [--provides|--requires] %{buildroot} %{ghclibdir} [%{?ghc_version}]" && exit 1 +[ $# -lt 3 ] && echo "Usage: $(basename "$0") [--provides|--requires] %{buildroot} %{ghclibdir} [ghc-version]" && exit 1 -set +x +set +x -e MODE=$1 BUILDROOT=$2 diff --git a/ghc-pkg-wrapper b/ghc-pkg-wrapper index 98566a8..9abd6e1 100755 --- a/ghc-pkg-wrapper +++ b/ghc-pkg-wrapper @@ -2,10 +2,11 @@ [ $# -lt 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghclibdir} ..." && exit 1 -set +x +set +x -e PKGBASEDIR=$1 shift + if [ -d $PKGBASEDIR/lib ]; then PKGCONFDIR=$PKGBASEDIR/lib/package.conf.d else PKGCONFDIR=$PKGBASEDIR/package.conf.d