2016-10-10 02:26:30 +05:30
|
|
|
#!/bin/sh
|
|
|
|
|
2017-11-17 11:01:44 +05:30
|
|
|
set -e
|
2016-10-10 02:26:30 +05:30
|
|
|
SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}');
|
2017-11-17 11:01:44 +05:30
|
|
|
cd $DIST_DIR;
|
2016-10-10 02:26:30 +05:30
|
|
|
if [ -f "$SRC_TGZ" ]; then
|
2017-11-17 11:01:44 +05:30
|
|
|
cabal install --only-dependencies "$SRC_TGZ";
|
|
|
|
cp $HOME/.ghc/$ARCH-$GHC_VER/package.conf.d/package.cache package.cache.bak
|
2016-10-10 02:26:30 +05:30
|
|
|
cabal install "$SRC_TGZ";
|
2017-11-17 11:01:44 +05:30
|
|
|
rm "$SRC_TGZ";
|
|
|
|
mv package.cache.bak $HOME/.ghc/$ARCH-$GHC_VER/package.conf.d/package.cache
|
2016-10-10 02:26:30 +05:30
|
|
|
else
|
|
|
|
echo "expected '$SRC_TGZ' not found";
|
|
|
|
exit 1;
|
|
|
|
fi
|