Created
October 8, 2011 18:29
-
-
Save oluies/1272665 to your computer and use it in GitHub Desktop.
shell scala script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SCRIPT="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")" | |
DIR=`dirname "${SCRIPT}"}` | |
exec scala $0 $DIR $SCRIPT | |
::!# | |
import java.io.File | |
object App { | |
def main(args: Array[String]): Unit = { | |
val Array(directory,script) = args.map(new File(_).getAbsolutePath) | |
println("Executing '%s' in directory '%s'".format(script, directory)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment