forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate-haskell-dependencies
executable file
·28 lines (26 loc) · 1.15 KB
/
generate-haskell-dependencies
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#
# @author Armin Wurzinger <e1528532@libelektra.org>
#
# @brief Generates the cabal install command for installing
# all required haskell dependencies to a custom sandbox location
#
# Please note that this is intended for developers to easily generate
# a list of all required dependencies to be included into
# - scripts/docker/jenkinsnode/Dockerfile
# - scripts/docker/debian/stretch/Dockerfile
# - scripts/docker/debian/sid/Dockerfile
# - src/bindings/haskell/README.md
# For the correct resolution it requires that the project
# has already been built once as cmake will configure the cabal files!
# Furthermore note that the scripts expects the build folder to be in
# the source folder and called `build`, otherwise you can pass your
# build directory as the first command line parameter for this script.
#
# @date 17.05.2018
# @tags build
SCRIPTS_DIR=$(dirname "$0")
. "${SCRIPTS_DIR}/include-common"
FILES=$(find ${1:-$SOURCE/build} \( -name '*.cabal' \) | awk '$0="\""$0"\""' | paste -sd "," -)
# good enough for now, we copy the output manually anyway
echo "generateHaskellDependencies [$FILES]" | ghci "${SCRIPTS_DIR}/generate-haskell-dependencies.hs"