Sha256: 4472e69611b30631a7139af7467d396d9fb998556782e416b25de06780eb0385

Contents?: true

Size: 947 Bytes

Versions: 2

Compression:

Stored size: 947 Bytes

Contents

#!/bin/sh
##
## RedPen startup script
##

SCRIPT="$0"

# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
while [ -h "$SCRIPT" ] ; do
  ls=`ls -ld "$SCRIPT"`
  # Drop everything prior to ->
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '/.*' > /dev/null; then
    SCRIPT="$link"
  else
    SCRIPT=`dirname "$SCRIPT"`/"$link"
  fi
done

# Find RedPen home
REDPEN_HOME=`dirname "$SCRIPT"`/..

# Make REDPEN_HOME absolute
REDPEN_HOME=`cd "$REDPEN_HOME"; pwd`


REDPEN_CLASSPATH=REDPEN_HOME/conf:$REDPEN_HOME/lib/*

if [ -z "$JAVA_HOME" ]; then
    echo "Error: JAVA_HOME is not defined. Can not start RedPen" 1>&2
    exit 1
fi

JAVA_OPTS="$JAVA_OPTS"

JAVA_CMD="$JAVA_HOME/bin/java"

if [ ! -x "$JAVA_CMD" ]; then
    echo "Error: $JAVA_CMD is not execututable. Can not start RedPen" 1>&2
    exit 1
fi

exec "$JAVA_CMD" $JAVA_OPTS \
  -classpath "$REDPEN_CLASSPATH" \
  cc.redpen.Main \
  "$@"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
redpen_ruby-0.2 lib/redpen-cli-1.1/bin/redpen
redpen_ruby-0.1 lib/redpen-cli-1.0/bin/redpen