mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
24 lines
364 B
Bash
24 lines
364 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
# cabal-run.sh target args
|
||
|
#
|
||
|
# is equivalent to
|
||
|
#
|
||
|
# cabal run target --args
|
||
|
#
|
||
|
# except that killing it will also kill the target.
|
||
|
#
|
||
|
# https://github.com/haskell/cabal/issues/7914
|
||
|
|
||
|
set -euo pipefail
|
||
|
|
||
|
target="$1"
|
||
|
shift
|
||
|
|
||
|
echo "building target: ${target}"
|
||
|
cabal build "$target"
|
||
|
|
||
|
executable=$(cabal list-bin "$target")
|
||
|
|
||
|
exec "$executable" "$@"
|