Skip to content

Instantly share code, notes, and snippets.

Created December 21, 2012 23:31
Show Gist options
  • Save anonymous/26f2c8711da5561696c6 to your computer and use it in GitHub Desktop.
Save anonymous/26f2c8711da5561696c6 to your computer and use it in GitHub Desktop.
#! /bin/bash
: ${BEAM_VARIANT:=normal}
BEAM_DIR=/home/jmeredith/.kerl/installs/r15b01-debug/erts-5.9.1/bin
case $BEAM_VARIANT in
valgrind)
exec valgrind --log-file=beam.smp.%p $BEAM_DIR/beam.${BEAM_VARIANT}.smp "$@"
;;
debug)
echo "Running in gdb\r\n" >> /tmp/t
echo "gdb --args $BEAM_DIR/beam.${BEAM_VARIANT}.smp $@" >> /tmp/t
exec gdb --args $BEAM_DIR/beam.${BEAM_VARIANT}.smp "$@"
;;
*)
exec $BEAM_DIR/beam.${BEAM_VARIANT}.smp "$@"
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment