#!/bin/sh if [ -z "$2" ] then echo "Usage: $0 [year] [login ...]" exit 1 fi if ! which gearman > /dev/null 2> /dev/null then echo "gearman isn't installed on this machine. Please try another one." exit 1 fi if [ "x${1:0:2}" = "x20" ] then YEAR="$1" shift else YEAR=`ldapsearch -x -b "cn=year,dc=acu,dc=epita,dc=fr" | grep "^year" | cut -d " " -f 2` fi PROJECT_ID=$1 RENDU=$2 shift 2 LOGINS= while [ $# -gt 0 ] do LOGINS=" $1 " shift done cat < moulette $YEAR $PROJECT_ID $RENDU $LOGINS EOF