Easy-to-use script to build from SVN. Written for Bash, may work in other shells. Unzip it somewhere in your path, rename it if you like, possibly modify values for BUILDDIR and JAVA_HOME. Invoke as "mafia" to build and launch KoLmafia, "mafia -f" to skip the build process, "mafia -h" to see a list of all the options. Like so:

$ mafia -h
mafia:  build KoLmafia from SVN and launch from command line

Usage:  mafia [options]
  -b    unconditionally build
  -c    check out new version from SVN
  -f    fast launch; skip build process
  -n    do not launch KoLmafia when finished
  -h    show this help
Advanced usage options (untested, but should work). This script is written to work when called from cron, so you can make an entry in your crontab calling "mafia -n" to do the build, and optionally "alias mafia='mafia -f'" in your .bashrc to have the benefits of a daily build and fast launch. Also, you should be able to create an icon on your desktop with the command if you prefer a GUI launch to the terminal.

Changes from the previous version:

  • Now checks if there's an actual new version instead of whether the current build is less than an hour old.
  • Fast launch & force build options made properly mutually exclusive.
  • Old build restored if the build fails for any reason. (Requires "mktemp" in your path.)
  • New JAVA_MAFIA_OPTIONS environment variable for passing options to Java when launching KoLmafia.