Skip to content

Instantly share code, notes, and snippets.

@dln
Created May 4, 2011 08:38
Show Gist options
  • Save dln/954936 to your computer and use it in GitHub Desktop.
Save dln/954936 to your computer and use it in GitHub Desktop.
Keep fsc (Fast Scala Compiler) alive so intellij doesn't lock up when fsc shuts down when idle.
#!/bin/bash
JAVA_OPTS="$JAVA_OPTS -Xmx512M -Xms64M" fsc -shutdown
DUMMY=$(mktemp -t fsc-dummy.$USER.XXXXX)
echo "object Dummy { val answer = 42 }" > $DUMMY
trap "rm -f $DUMMY" EXIT
while true; do
echo Compiling dummy...
scala $DUMMY
sleep 1500
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment