aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-08-27 18:52:26 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-08-27 18:52:26 +0200
commit157cfb53784304d7a6acf583ba4ded451b79e309 (patch)
treedea8995e660095edcc801d2cf9e1b7923d8b525e
parente40362959109f6e362a3c2b8daaae0f4ef04f0f1 (diff)
downloadmeteo_toolbox-157cfb53784304d7a6acf583ba4ded451b79e309.tar.gz
icon_download parallel decompress
-rwxr-xr-xicon_download.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/icon_download.sh b/icon_download.sh
index 343b10c..462685c 100755
--- a/icon_download.sh
+++ b/icon_download.sh
@@ -45,7 +45,11 @@ done
echo Done downloading. Decompressing...
for F in $OUTDIR/*.grib2.bz2; do
- bzip2 -df "$F"
+ while [ $(pgrep -c -P$$) -gt 5 ]; do
+ sleep 1
+ done
+
+ bzip2 -df "$F" &
done
rm -f $OUTDIR/combined.grib2