#!/bin/sh # $Id: perl.in 5550 2009-02-19 18:14:43Z cher $ # Copyright (c) 2003-2008 Alexander Chernov # This is a `compilation' script for the Perl language. # The idea is to append "#!${PERLPATH} -W" string # to the beginning of the file. # Usage: perl # 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}/perl.cfg" if [ -f "${EJUDGE_LANG_CONFIG}" ] then . "${EJUDGE_LANG_CONFIG}" else version="unknown" PERLPATH="/usr/bin/perl" fi if [ x"${version}" = x ] then echo "This language is not supported." >&2 exit 1 fi echo "#! ${PERLPATH} -W ${EJUDGE_FLAGS}" > $2 echo >> $2 cat $1 >> $2 chmod +x $2 exit 0