summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cmd/build.sh18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/cmd/build.sh b/lib/cmd/build.sh
index 317ce5a..2a7f5d2 100644
--- a/lib/cmd/build.sh
+++ b/lib/cmd/build.sh
@@ -86,19 +86,17 @@ cmd_build_main()
build_deps="$(package_get_build_deps "${arch}" "${plat}")"
if [ "x${build_deps}" != 'x' ]; then
cmd_build_make_deps_pkg "${root}" "${build_deps}"
+ session_exec opkg install ../builddeps.opk
fi
- session_exec sh <<-EOF
- if [ 'x${build_deps}' != 'x' ]; then
- opkg install ../builddeps.opk
- fi
- opkbuild ${@}
- if [ 'x${build_deps}' != 'x' ]; then
- opkg --autoremove remove prokit-builddeps-$(session_id)
- fi
- EOF
+ session_exec opkbuild "${@}"
+
+ if [ "x${build_deps}" != 'x' ]; then
+ session_exec opkg --autoremove remove \
+ prokit-builddeps-$(session_id)
+ rm "${root}${session_dir}/builddeps.opk"
+ fi
- rm -f "${root}${session_dir}/builddeps.opk"
for f in "${root}${session_dir}/"*; do
[ -e "${f}" ] || continue
[ "x${f##*/}" = 'xwd' ] && continue