Skip to content
Snippets Groups Projects

Really only run eventlogging on --make mode

Merged Bryan R requested to merge b/really-make-mode into master
1 file
+ 10
3
Compare changes
  • Side-by-side
  • Inline
+ 10
3
@@ -7,18 +7,22 @@
: ${GHC:?GHC must be set}
: ${EVENTLOG_DIR:?EVENTLOG_DIR must be set}
# Parse unit-id out of args
# Parse --make and unit-id out of args
#
# Example:
# -this-unit-id Cabal-3.0.2.0-b925bb4a908ac87dbee8e61089f84aad30e5791bc2f3e6ffef7bdbb944fda648
args=( "$@" )
i=0
unit_id=
make_mode=
while :
do
k="${args[$i]}"
v="${args[$i+1]}"
if [[ -n $k && -n $v ]]
if [[ $k == "--make" ]]
then
make_mode="$k"
elif [[ -n $k && -n $v ]]
then
if [[ $k == "-this-unit-id" ]]
then
@@ -32,5 +36,8 @@ do
done
# Continue with tracing, if applicable
log_args=${unit_id:+ +RTS -l -ol${EVENTLOG_DIR}/${unit_id}.eventlog -RTS}
if [[ -n $make_mode ]]
then
log_args=${unit_id:+ +RTS -l -ol${EVENTLOG_DIR}/${unit_id}.eventlog -RTS}
fi
exec $GHC "$@"$log_args
Loading