mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-08 21:34:25 +00:00
chore(scripts/git-all): improve debugging
This commit is contained in:
@@ -49,17 +49,19 @@ end
|
|||||||
|
|
||||||
if set -q '_flag_debug'
|
if set -q '_flag_debug'
|
||||||
echo "DEBUG: repositories: $repositories"
|
echo "DEBUG: repositories: $repositories"
|
||||||
|
set _parallel_flag_debug '-t'
|
||||||
|
set _xargs_flag_debug '-t'
|
||||||
end
|
end
|
||||||
|
|
||||||
switch $_flag_executor
|
switch $_flag_executor
|
||||||
case 'parallel'
|
case 'parallel'
|
||||||
if ! which -s parallel
|
if ! which parallel > /dev/null
|
||||||
echo "Error: GNU parallel not found" >&2
|
echo "Error: GNU parallel not found" >&2
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
parallel --color-failed -j "$_flag_threads" --tagstring "{/}" "git -C {} $_flag_command" ::: $repositories
|
parallel --color-failed $_parallel_flag_debug -j "$_flag_threads" --tagstring "{/}" "git -C {} $_flag_command" ::: $repositories
|
||||||
case 'xargs'
|
case 'xargs'
|
||||||
echo $repositories | xargs -tP "$_flag_threads" -I{} git -C "{}" $_flag_command
|
echo $repositories | xargs $_xargs_flag_debug -P "$_flag_threads" -I{} git -C "{}" $_flag_command
|
||||||
case '*'
|
case '*'
|
||||||
echo "Error: $runner not supported" >&2
|
echo "Error: $runner not supported" >&2
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user