diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-02-18 09:03:29 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-02-19 07:33:03 +0100 |
commit | 5334086af718bf4309e0118e927444784ba41b95 (patch) | |
tree | 373ca55defef2c4e159ffcd8ea43aced22baa4db | |
parent | 714827b6023e7dd248bcdbce4b47b02cc5aa5f35 (diff) | |
download | ptxdist-5334086af718bf4309e0118e927444784ba41b95.tar.gz ptxdist-5334086af718bf4309e0118e927444784ba41b95.tar.xz |
ptxd_make_world_prepare: move build dir setup into a separate function
This makes it reusable elsewhere.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_make_world_prepare.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/lib/ptxd_make_world_prepare.sh b/scripts/lib/ptxd_make_world_prepare.sh index 3d1b1c5b5..34ad9bd29 100644 --- a/scripts/lib/ptxd_make_world_prepare.sh +++ b/scripts/lib/ptxd_make_world_prepare.sh @@ -157,6 +157,15 @@ ptxd_make_world_prepare_meson() { } export -f ptxd_make_world_prepare_meson +ptxd_make_world_prepare_init() { + # delete existing build_dir + if [ -n "${pkg_build_oot}" ]; then + rm -rf -- "${pkg_build_dir}" && + mkdir -p -- "${pkg_build_dir}" + fi + +} +export -f ptxd_make_world_prepare_init # # generic prepare @@ -171,11 +180,7 @@ ptxd_make_world_prepare() { return fi - # delete existing build_dir - if [ -n "${pkg_build_oot}" ]; then - rm -rf -- "${pkg_build_dir}" && - mkdir -p -- "${pkg_build_dir}" || return - fi + ptxd_make_world_prepare_init || return case "${pkg_conf_tool}" in autoconf|cmake|qmake|kconfig|perl|meson) |