#!/bin/sh # $Id: ruby.in 5550 2009-02-19 18:14:43Z cher $ # Copyright (c) 2008 Alexander Chernov # This is a `compilation' script for the Ruby language. # The idea is to append "#!${RUBYPATH}" string # to the beginning of the file. # Usage: ruby # using EJUDGE_FLAGS we may pass additional flags LANG_CONFIG_DIR="/home/judges/compile/conf/lang.d" [ "${EJUDGE_LANG_CONFIG}" = "" ] && EJUDGE_LANG_CONFIG="${LANG_CONFIG_DIR}/ruby.cfg" if [ -f "${EJUDGE_LANG_CONFIG}" ] then . "${EJUDGE_LANG_CONFIG}" else version="unknown" RUBYPATH="/usr/bin/ruby" fi if [ x"${version}" = x ] then echo "This language is not supported." >&2 exit 1 fi echo "#! ${RUBYPATH} ${EJUDGE_FLAGS}" > $2 echo >> $2 cat $1 >> $2 chmod +x $2 exit 0