18 lines
780 B
Bash
18 lines
780 B
Bash
|
#!/bin/bash
|
||
|
if [ "$#" -ne 1 ] ; then
|
||
|
echo -e "usage : $0 <FILE>\n\tGenerate the exercice for a class.\nFILE must be a list containing identifiers (names) and passwords for each student, separated by a '='.\n\tEx:\n\t\tJean-claude-dus=mot_de_passe\n\t\tJean-dus-claude=passe_de_mot\n\t\tClaude-jean-dus=azerty\n\nThis file must be executed from the same folder as the files gen_arbo.sh, gen_seed.sh and gen_enonces.sh.\nFolders will be created in this directory, containing the exercices, their correction and the grades of the students."
|
||
|
exit 1;
|
||
|
fi
|
||
|
|
||
|
cat $1
|
||
|
|
||
|
home=/home
|
||
|
names=$(cut -d '=' -f 1 $1)
|
||
|
|
||
|
|
||
|
for name in $names ; do
|
||
|
./gen_arbo.sh $home/$name $name
|
||
|
./gen_seed.sh $home/$name 4 0 5 1 $name seeds
|
||
|
./gen_enonces.sh seeds $name /dev/null $home/$name $1
|
||
|
done
|