fix panic message duplication
This commit is contained in:
parent
46c73bc54e
commit
55fe9abfdc
@ -6,7 +6,7 @@
|
|||||||
# shellcheck disable=2154
|
# shellcheck disable=2154
|
||||||
|
|
||||||
# TODO add some colors ?
|
# TODO add some colors ?
|
||||||
panic() { printf "panic >> %s\n" "$1" >&2; exit 1; }
|
panic() { printf "panic >> %s\n" "$1" >&2; panic=1; exit 1; }
|
||||||
info() { printf "info >> %s\n" "$1"; }
|
info() { printf "info >> %s\n" "$1"; }
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
@ -482,7 +482,7 @@ create_initramfs()
|
|||||||
ret="$?"
|
ret="$?"
|
||||||
trap - EXIT INT
|
trap - EXIT INT
|
||||||
[ "$debug" != 1 ] && remove_workdir
|
[ "$debug" != 1 ] && remove_workdir
|
||||||
[ "$ret" != 0 ] && panic "something went wrong"
|
[ "$ret" != 0 ] && [ "$panic" != 1 ] && panic "something went wrong"
|
||||||
' EXIT INT
|
' EXIT INT
|
||||||
|
|
||||||
create_structure
|
create_structure
|
||||||
|
Loading…
Reference in New Issue
Block a user