]> Creatis software - clitk.git/commitdiff
Copy pasted common.sh code
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Wed, 22 Jun 2011 08:33:44 +0000 (10:33 +0200)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Wed, 22 Jun 2011 08:33:44 +0000 (10:33 +0200)
scripts/create_midP_masks.sh

index e5894a4ecbc06b707667cbbf0aaafd646a565800..8e4af7aeddbfb2d13117d895c9276d8d62b7a472 100755 (executable)
@@ -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()
 {