Add new scripts for moulettes
This commit is contained in:
parent
db62048be2
commit
dcb6033caa
43
commands/moulette/launch.sh
Executable file
43
commands/moulette/launch.sh
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$2" ]
|
||||
then
|
||||
echo "Usage: $0 [year] <project> <submission> [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=" <param name=\"year\">$1</param>"
|
||||
shift
|
||||
else
|
||||
YEAR=
|
||||
fi
|
||||
PROJECT_ID=$1
|
||||
RENDU=$2
|
||||
|
||||
shift 2
|
||||
|
||||
LOGINS=
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
LOGINS=" <param>$1</param>
|
||||
"
|
||||
shift
|
||||
done
|
||||
|
||||
cat <<EOF | gearman -h gearmand -p 4730 -f moulette_get
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<process>
|
||||
<param name="type">moulette</param>
|
||||
$YEAR
|
||||
<param name="id">$PROJECT_ID</param>
|
||||
<param name="rendu">$RENDU</param>
|
||||
$LOGINS</process>
|
||||
EOF
|
40
commands/moulette/sendgit.sh
Executable file
40
commands/moulette/sendgit.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$2" ]
|
||||
then
|
||||
echo "Usage: $0 [year] <project> <submission> [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=" <param name=\"year\">$1</param>"
|
||||
shift
|
||||
else
|
||||
YEAR=
|
||||
fi
|
||||
PROJECT_ID=$1
|
||||
RENDU=$2
|
||||
|
||||
shift 2
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
LOGIN=$1
|
||||
cat <<EOF | gearman -h gearmand -p 4730 -f send_git -b
|
||||
<?xml version="1.0"?>
|
||||
<process>
|
||||
$YEAR
|
||||
<param name="id">$PROJECT_ID</param>
|
||||
<param name="rendu">$RENDU</param>
|
||||
<param name="login">$LOGIN</param>
|
||||
</process>
|
||||
EOF
|
||||
shift
|
||||
done
|
Reference in New Issue
Block a user