]> Sergey Matveev's repositories - feeder.git/blob - cmd/do-in-parallel
dc14114e487bb8398321438828ac255c6965f43d
[feeder.git] / cmd / do-in-parallel
1 #!/usr/bin/env zsh
2 setopt ERR_EXIT
3 cmds=$0:h:a
4 . $cmds/env.rc
5 log=$1.log
6 ${=PARALLEL} --jobs ${(P)2} --joblog $log $3 ::: feeds/* || rc=$?
7 fpath=($cmds/functions.zsh $fpath)
8 autoload print-joblog-failed
9 print-joblog-failed < $log
10 exit ${rc:-0}