File tree Expand file tree Collapse file tree 1 file changed +7
-20
lines changed
Expand file tree Collapse file tree 1 file changed +7
-20
lines changed Original file line number Diff line number Diff line change @@ -203,28 +203,15 @@ export columns
203203hide_cursor
204204trap show_cursor_and_cleanup INT
205205
206- # export functions so subshells can call them
207- export -f effort
208- export -f color_for
209- export -f active_days
210- export -f dates
211- export -f tputq
212- export to_tty
213- export above
214- export log_args
215-
216-
217- bash_params=
218- # If bash exits successfully with --import-functions,
219- # then we need to pass it (FreeBSD probably)
220- bash --import-functions -c " :" 1> /dev/null 2>&1
221- if [ $? -eq 0 ] ; then
222- bash_params=" --import-functions"
223- fi
224-
225206heading
207+
226208# send paths to effort
227- printf " %s\0" " ${paths[@]} " | xargs -0 -n 1 -P 4 -I % bash $bash_params -c " effort \" %\" " | tee $tmp
209+ nPaths=${# paths[@]}
210+ for (( i= 0 ; i< nPaths; ++ i))
211+ do
212+ effort " ${paths[i]} " &
213+ done| tee $tmp
214+ wait
228215
229216# if more than one path, sort and print
230217test " $( wc -l $tmp | awk ' {print $1}' ) " -gt 1 && sort_effort
You can’t perform that action at this time.
0 commit comments