mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-15 17:58:46 +02:00
unify err functions across scripts
include/err.sh this new handling also does mundane things, such as tell you what script b0rked Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||
set -u -e
|
||||
|
||||
. "include/err.sh"
|
||||
|
||||
projectname="$(cat projectname)"
|
||||
opts=""
|
||||
boards=
|
||||
@@ -116,9 +118,4 @@ buildrom() {
|
||||
./build boot roms_helper ${1}${opts}
|
||||
}
|
||||
|
||||
err() {
|
||||
printf '%s\n' "${1}" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
@@ -30,11 +30,7 @@
|
||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||
set -u -e
|
||||
|
||||
err()
|
||||
{
|
||||
printf "ERROR: build/boot/roms: %s\n" "${1}" 1>&2
|
||||
exit 1
|
||||
}
|
||||
. "include/err.sh"
|
||||
|
||||
projectname="$(cat projectname)"
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||
set -u -e
|
||||
|
||||
. "include/err.sh"
|
||||
|
||||
main()
|
||||
{
|
||||
printf "Cleaning crossgcc builds in all coreboot archives\n"
|
||||
@@ -34,10 +36,4 @@ main()
|
||||
done
|
||||
}
|
||||
|
||||
err()
|
||||
{
|
||||
printf "%s: %s\n" $0 $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||
set -u -e
|
||||
|
||||
. "include/err.sh"
|
||||
|
||||
ich9gen="util/ich9utils/ich9gen"
|
||||
|
||||
main()
|
||||
@@ -36,10 +38,4 @@ main()
|
||||
)
|
||||
}
|
||||
|
||||
err()
|
||||
{
|
||||
printf "%s: %s\n" $0 $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||
set -u -e
|
||||
|
||||
. "include/err.sh"
|
||||
|
||||
main()
|
||||
{
|
||||
printf "Building GRUB\n"
|
||||
@@ -41,10 +43,4 @@ build_grub()
|
||||
)
|
||||
}
|
||||
|
||||
err()
|
||||
{
|
||||
printf "%s: error: %s\n" $0 $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||
set -u -e
|
||||
|
||||
. "include/err.sh"
|
||||
|
||||
projectname="$(cat projectname)"
|
||||
version="version-unknown"
|
||||
versiondate="version-date-unknown"
|
||||
@@ -165,10 +167,4 @@ strip_rom_image()
|
||||
${cbfstool} "${romfile}" remove -n "pci10de,06eb.rom" || exit 1
|
||||
}
|
||||
|
||||
err()
|
||||
{
|
||||
printf "%s: %s\n" $0 $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||
set -u -e
|
||||
|
||||
. "include/err.sh"
|
||||
|
||||
projectname="$(cat projectname)"
|
||||
|
||||
trees_fetch_list="coreboot u-boot"
|
||||
@@ -161,9 +163,4 @@ create_release_archive()
|
||||
)
|
||||
}
|
||||
|
||||
err()
|
||||
{
|
||||
printf "%s: %s\n" $0 $1
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||
set -u -e
|
||||
|
||||
. "include/err.sh"
|
||||
|
||||
mode=""
|
||||
project=""
|
||||
|
||||
@@ -61,10 +63,4 @@ main()
|
||||
|| err "cannot clean project src, ${project}"
|
||||
}
|
||||
|
||||
err()
|
||||
{
|
||||
printf "ERROR: build/src: %s\n" "${1}" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
Reference in New Issue
Block a user