From 58fe90ca405ba1b2ec7fbf093b7a0b7cbdc43cc2 Mon Sep 17 00:00:00 2001 From: qo-op Date: Wed, 27 Jan 2021 16:45:53 +0100 Subject: [PATCH] =?UTF-8?q?SI=20STYLE=3D1=20ALORS=20cr=C3=A9e=20un=20seul?= =?UTF-8?q?=20billet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- G1BILLETS.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/G1BILLETS.sh b/G1BILLETS.sh index c8659c0..b58884e 100755 --- a/G1BILLETS.sh +++ b/G1BILLETS.sh @@ -15,15 +15,19 @@ MONTANT="$1" UNIQID="$2" STYLE="$3" +NBbillets=6 + + [[ $MONTANT == "" ]] && MONTANT="___" [[ $UNIQID == "" ]] && UNIQID=$(date -u +%s%N | cut -b1-13)$RANDOM +[[ "$STYLE" == "1" ]] && NBbillets=1 && STYLE="" ## SEULEMENT 1 BILLET + # CHECK IF $STYLE IMAGES EXIST [[ ! -f ${MY_PATH}/images/fond${STYLE}.jpg ]] && exit 1 [[ ! -f ${MY_PATH}/images/g1${STYLE}.png ]] && exit 1 [[ ! -f ${MY_PATH}/images/logo${STYLE}.png ]] && exit 1 -# CREATION DE 6 BILLETS DE $MONTANT DU -NBbillets=6 +# CREATION DE $NBbillets BILLETS DE $MONTANT DU boucle=0; while [ $boucle -lt $NBbillets ] do