mirror of
https://gitlab.com/TECHNOFAB/soonix.git
synced 2026-02-02 07:15:06 +01:00
chore: make output a bit nicer
This commit is contained in:
parent
1433186d97
commit
2e25d42c85
1 changed files with 12 additions and 8 deletions
|
|
@ -222,20 +222,24 @@ in {
|
||||||
|
|
||||||
${runHooks}
|
${runHooks}
|
||||||
|
|
||||||
echo -n "[soonix] " >&2
|
local output=$'\E[msoonix:\E[38;5;8m'
|
||||||
|
local status=0
|
||||||
|
|
||||||
if [[ ''${#_soonix_updated[@]} -gt 0 ]]; then
|
if [[ ''${#_soonix_updated[@]} -gt 0 ]]; then
|
||||||
echo -n "[updated: ''${_soonix_updated[*]}] " >&2
|
output="$output [updated: ''${_soonix_updated[*]}]" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ''${#_soonix_uptodate[@]} -gt 0 ]]; then
|
if [[ ''${#_soonix_uptodate[@]} -gt 0 ]]; then
|
||||||
echo -n "[unchanged: ''${_soonix_uptodate[*]}] " >&2
|
output="$output [unchanged: ''${_soonix_uptodate[*]}]" >&2
|
||||||
|
fi
|
||||||
|
if [[ ''${#_soonix_failed[@]} -gt 0 ]]; then
|
||||||
|
output="$output [failed: ''${_soonix_failed[*]}]" >&2
|
||||||
|
status=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ''${#_soonix_failed[@]} -gt 0 ]]; then
|
printf "%s\E[m\n" "$output" >&2
|
||||||
echo "[failed: ''${_soonix_failed[*]}]" >&2
|
|
||||||
|
if [[ $status -eq 1 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue