home | career | drupal | java | mac | mysql | perl | scala | uml | unix

Groovy example source code file (groovysh)

This example Groovy source code file (groovysh) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

dirname, dirname/startgroovy, dirname/startgroovy, groovy, groovy, groovy_app_name=groovyshell, id, oldshell, prg, prg, revision, shell, un*x, un*x

The Groovy groovysh source code

#!/bin/sh

##############################################################################
##                                                                          ##
##  Groovy Shell script for UN*X                                            ##
##                                                                          ##
##############################################################################

##
## $Revision: 18152 $
## $Id: groovysh 18152 2009-10-29 09:39:32Z user57 $
##

GROOVY_APP_NAME=GroovyShell

# resolve links - $0 may be a soft-link
PRG="$0"

while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`/"$link"
    fi
done

DIRNAME=`dirname "$PRG"`

. "$DIRNAME/startGroovy"

if [ "x$OLDSHELL" != "x" ]; then
    startGroovy groovy.ui.InteractiveShell "$@"
else
    startGroovy org.codehaus.groovy.tools.shell.Main "$@"
fi

Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy groovysh source code file:

new blog posts

 

Copyright 1998-2014 Alvin Alexander, alvinalexander.com
All Rights Reserved.