]> gitweb.pimeys.fr Git - scripts-20-100.git/blob - bde/activites.sh
typo
[scripts-20-100.git] / bde / activites.sh
1 #!/bin/bash
2
3 # Pour avoir rapidement la liste des activités
4
5 export LESS="-S"
6
7 for i in $@
8 do
9 if [ $i = "--pot" ]
10 then pot=1;
11 fi;
12 done
13
14 if [ "${pot}" = "1" ]
15 then
16 CLAUSEPOT="AND titre ILIKE '%pot%'"
17 fi
18
19 psql note -c "SELECT cresp.pseudo AS responsablepseudo, cval.pseudo AS valideparpseudo, a.*
20 FROM activites AS a, comptes AS cresp, comptes AS cval
21 WHERE a.responsable = cresp.idbde AND a.validepar = cval.idbde
22 ${CLAUSEPOT}
23 ORDER BY debut DESC;"