mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-28 06:26:18 +03:00
f0087e8718
(grafted from dc7520ebc128363d5e86733fef7b67d1f20b60c5)
41 lines
936 B
Bash
Executable File
41 lines
936 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
. ./travis-CI/sh-lib
|
|
. ./travis-CI/custom-cabal
|
|
. ./travis-CI/dirs.list
|
|
|
|
set -x
|
|
|
|
cabal --version
|
|
echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
|
|
|
BENCH=${BENCH---enable-benchmarks}
|
|
TEST=${TEST---enable-tests}
|
|
|
|
gen_custom_cabal_config
|
|
custom_retry cabal update -v
|
|
sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
|
|
grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
|
|
|
|
install_package() {
|
|
rm -fv cabal.project.local
|
|
echo 'packages: .' > cabal.project
|
|
cat cabal.project
|
|
if [ -f configure.ac ]; then autoreconf -i; fi
|
|
rm -f cabal.project.freeze
|
|
cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all
|
|
cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all
|
|
|
|
rm -rf .ghc.environment.* dist/
|
|
}
|
|
|
|
if [ x"$dirs" = x ]; then
|
|
install_package
|
|
else
|
|
for d in $dirs; do
|
|
( cd $d && install_package )
|
|
done
|
|
fi
|