more minor cleanup in the build system
Signed-off-by: Leah Rowe <leah@libreboot.org>audit2-merge1
parent
10ecf41ee0
commit
4783c5b90e
21
build
21
build
|
@ -26,7 +26,7 @@ main()
|
|||
[ $# -lt 1 ] && $err "Check $projectname documentation for help."
|
||||
spath="script/$1"
|
||||
|
||||
[ "$1" = "dependencies" ] && x_ install_packages $@ && xbmk_exit 0
|
||||
[ "$1" = "dependencies" ] && x_ install_packages $@ && return 0
|
||||
|
||||
which git 1>/dev/null 2>/dev/null || \
|
||||
git_err "git not installed. please install git-scm."
|
||||
|
@ -45,7 +45,6 @@ main()
|
|||
[ -f "${spath}" ] || $err "Bad command. Check docs."
|
||||
shift 1; "$spath" $@ || $err "excmd: ${spath} ${@}" ;;
|
||||
esac
|
||||
xbmk_exit 0
|
||||
}
|
||||
|
||||
install_packages()
|
||||
|
@ -61,9 +60,8 @@ install_packages()
|
|||
|
||||
. "config/dependencies/${2}"
|
||||
|
||||
x_ ${pkg_add} ${pkglist}
|
||||
[ -z "${aur_notice}" ] && return 0
|
||||
printf "You must install AUR packages: %s\n" "$aur_notice" 1>&2
|
||||
x_ $pkg_add $pkglist && [ -n "$aur_notice" ] && \
|
||||
printf "Please install AUR packages: %s\n" "$aur_notice" 1>&2; return 0
|
||||
}
|
||||
|
||||
git_init()
|
||||
|
@ -118,13 +116,11 @@ build_release()
|
|||
) || $err "can't create release files"
|
||||
|
||||
git log --graph --pretty=format:'%Cred%h%Creset %s %Creset' \
|
||||
--abbrev-commit > "${srcdir}/CHANGELOG" || \
|
||||
$err "build_release $srcdir: couldn't generate changelog"
|
||||
--abbrev-commit > "${srcdir}/CHANGELOG" || $err "!gitlog $srcdir"
|
||||
|
||||
(
|
||||
cd "${srcdir%/*}" || $err "${_xm}: mktarball \"${srcdir}\""
|
||||
mktarball "${srcdir##*/}" "${srcdir##*/}.tar.xz" || \
|
||||
$err "$_xm: mksrc"
|
||||
mktarball "${srcdir##*/}" "${srcdir##*/}.tar.xz" || $err "$_xm: mksrc"
|
||||
) || $err "can't create src tarball"
|
||||
[ "${mode}" = "src" ] && return 0
|
||||
|
||||
|
@ -152,12 +148,6 @@ fetch_trees()
|
|||
rm -Rf tmp .git src/u-boot/*/test/lib/strlcat.c || $err "$_xm !rm"
|
||||
}
|
||||
|
||||
xbmk_exit()
|
||||
{
|
||||
tmp_cleanup || err_ "xbmk_exit: can't rm tmpdir upon exit $1: $tmpdir"
|
||||
exit $1
|
||||
}
|
||||
|
||||
fail()
|
||||
{
|
||||
tmp_cleanup || printf "WARNING: can't rm tmpdir: %s\n" "$tmpdir" 1>&2
|
||||
|
@ -171,3 +161,4 @@ tmp_cleanup()
|
|||
}
|
||||
|
||||
main $@
|
||||
tmp_cleanup || err_ "can't rm tmpdir upon non-zero exit: $tmpdir"
|
||||
|
|
Loading…
Reference in New Issue