From: Simon Rit Date: Wed, 22 Jun 2011 08:33:44 +0000 (+0200) Subject: Copy pasted common.sh code X-Git-Tag: v1.3.0~314 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5c8da3de9d30123425a37bdfc227af9c62cf9a26;p=clitk.git Copy pasted common.sh code --- diff --git a/scripts/create_midP_masks.sh b/scripts/create_midP_masks.sh index e5894a4..8e4af7a 100755 --- a/scripts/create_midP_masks.sh +++ b/scripts/create_midP_masks.sh @@ -1,7 +1,14 @@ #! /bin/bash -x -# imports -. common.sh +MAX_THREADS=2 + +check_threads() +{ + while [[ $(jobs -p | wc -l) -ge $1 ]]; do + jobs + sleep 10 + done +} extract_patient() {