qcm

Faire des qcm simplement - retour accueil

git clone git://bebou.netlib.re/qcm
Log | Files | Refs | README |

commit b13ee3d4c43538fdcc7ea6dcbf47ee81e43d6b96
parent c93dfa2d79a5d9c8411a7a00fdb606a933fbf266
Auteurice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Thu, 14 Nov 2024 16:58:58 +0100

Honorer l'existence de TMPDIR

Voir :

https://dotat.at/@/2024-10-22-tmp.html

Diffstat:
Mqcm.sh | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/qcm.sh b/qcm.sh @@ -129,9 +129,9 @@ plotcmd="cat" url="http://bebou.netlib.re" logs="/var/log/nginx/access.log" -while getopts "hegl:u:" opt; do +while getopts "hegl:u:i:" opt; do case $opt in - ( l | u ) [ ! -z $OPTARG ] && eval "$opt='$OPTARG'" ;; + ( l | u | i ) [ ! -z $OPTARG ] && eval "$opt='$OPTARG'" ;; ( g ) command -v gnuplot && plotcmd="gplot" ;; ( h ) usage; exit ;; ( e ) hide="yes";; @@ -139,7 +139,7 @@ while getopts "hegl:u:" opt; do esac done -tmpd=$(mktemp -d /tmp/qcm.XXX) +tmpd=$(mktemp -d ${TMPDIR:-/tmp}/qcm.XXX) id=$(echo "$tmpd" | cut -d '.' -f2) alias question:=question; question() question="$*"