Files
jugement_majoritaire/samples/check.sh
philippe lhardy b7d7fdf8a3 test 4 verificaiton d'un index de vote invalide
+ correction php
2025-06-23 10:21:28 +02:00

27 lines
503 B
Bash
Executable File

#!/bin/bash
if [[ $# > 0 ]]
then
vote=$1
fi
if [[ -z $vote ]]
then
echo "[ERROR] numéro de vote manquant ( ex 1 pour 1.json )"
exit 1
fi
json_file=$vote.json
json=~/clients/artlog/artisanlogiciel.code/artlog_jsontools/build/json
if [[ -x $json ]]
then
json_indent_file=$vote.indent.json
echo "generating $json_indent_file"
$json indent=spaces:2 -- $json_file > $json_indent_file
json=$json_file
fi
python3 parse_sample.py $json_file
php parse_sample.php $json_file