Skip to content

Instantly share code, notes, and snippets.

View rockymadden's full-sized avatar
:octocat:
Setting status

Rocky Madden rockymadden

:octocat:
Setting status
  • UiPath
  • Pale Blue Dot
View GitHub Profile
@rockymadden
rockymadden / scala.sh
Last active May 31, 2018 01:33
Scala bash script header. Nice because it will automatically load jars in the same directory into the classpath. I use it when making thin CLI wrappers around sibling projects APIs. Works on all OS X and Debian machines I have tried.
#!/bin/bash
dir="`dirname \"$0\"`"
dir="`( cd \"$dir\" && pwd )`"
cp=`echo $dir/*.jar|sed 's/ /:/g'`
exec scala -classpath "$cp" -savecompiled "$0" "$@"
!#