Skip to content

Commit f1ef08a

Browse files
authored
Merge pull request #29363 from compnerd/bs-check
build-script: reduce duplication of check
2 parents f254619 + 53c7bb0 commit f1ef08a

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

utils/build-script-impl

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2650,6 +2650,10 @@ for host in "${ALL_HOSTS[@]}"; do
26502650
if ! [[ $(should_execute_action "${host}-${tmp_product}-install") ]]; then
26512651
continue
26522652
fi
2653+
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
2654+
echo "--install-destdir is required to install products."
2655+
exit 1
2656+
fi
26532657

26542658
INSTALL_TARGETS="install"
26552659

@@ -2692,20 +2696,12 @@ for host in "${ALL_HOSTS[@]}"; do
26922696
if [[ -z "${INSTALL_LLDB}" ]] ; then
26932697
continue
26942698
fi
2695-
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
2696-
echo "--install-destdir is required to install products."
2697-
exit 1
2698-
fi
26992699
INSTALL_TARGETS="install-distribution"
27002700
;;
27012701
xctest)
27022702
if [[ -z "${INSTALL_XCTEST}" ]] ; then
27032703
continue
27042704
fi
2705-
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
2706-
echo "--install-destdir is required to install products."
2707-
exit 1
2708-
fi
27092705

27102706
case ${host} in
27112707
linux-*|freebsd-*|cygwin-*|haiku-*|android-*) ;;
@@ -2727,11 +2723,6 @@ for host in "${ALL_HOSTS[@]}"; do
27272723
continue
27282724
fi
27292725

2730-
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
2731-
echo "--install-destdir is required to install products."
2732-
exit 1
2733-
fi
2734-
27352726
;;
27362727
libdispatch|libdispatch_static)
27372728
if [[ -z "${INSTALL_LIBDISPATCH}" ]] ; then
@@ -2765,10 +2756,6 @@ for host in "${ALL_HOSTS[@]}"; do
27652756
if [[ -z "${INSTALL_LIBICU}" ]]; then
27662757
continue
27672758
fi
2768-
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
2769-
echo "--install-destdir is required to install products."
2770-
exit 1
2771-
fi
27722759
echo "--- Installing ${product} ---"
27732760
ICU_BUILD_DIR=$(build_directory ${host} ${product})
27742761
ICU_INSTALL_DIR="$(get_host_install_destdir ${host})$(get_host_install_prefix ${host})"
@@ -2806,10 +2793,6 @@ for host in "${ALL_HOSTS[@]}"; do
28062793
if [[ -z "${INSTALL_PLAYGROUNDSUPPORT}" ]] ; then
28072794
continue
28082795
fi
2809-
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
2810-
echo "--install-destdir is required to install products."
2811-
exit 1
2812-
fi
28132796

28142797
echo "--- Installing ${product} ---"
28152798

@@ -2845,11 +2828,6 @@ for host in "${ALL_HOSTS[@]}"; do
28452828
;;
28462829
esac
28472830

2848-
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
2849-
echo "--install-destdir is required to install products."
2850-
exit 1
2851-
fi
2852-
28532831
echo "--- Installing ${product} ---"
28542832
build_dir=$(build_directory ${host} ${product})
28552833

0 commit comments

Comments
 (0)