mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-29 15:44:03 +00:00
scripts: fix finishing the toolchain when download/extract-only is set
In case we only download or extract the sources, do not fail while finishing the toolchain: the test-suite directory may not exist, so we can't chmod it. Also, use safer constructs that won't trigger the 'set -e' in case of failure (eg.: "[ ... ] && ..." is not safe in case the test fails). Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
parent
81c28d831b
commit
7057f45317
@ -659,7 +659,12 @@ if [ "${CT_LOG_TO_FILE}" = "y" ]; then
|
||||
bzip2 -9 "${CT_PREFIX_DIR}/build.log"
|
||||
fi
|
||||
fi
|
||||
[ "${CT_INSTALL_DIR_RO}" = "y" ] && chmod -R a-w "${CT_INSTALL_DIR}"
|
||||
[ "${CT_TEST_SUITE}" = "y" ] && chmod -R u+w "${CT_TEST_SUITE_DIR}"
|
||||
if [ "${CT_INSTALL_DIR_RO}" = "y" ]; then
|
||||
chmod -R a-w "${CT_INSTALL_DIR}"
|
||||
fi
|
||||
# CT_TEST_SUITE_DIR may not exist if only downloading or extracting
|
||||
if [ "${CT_TEST_SUITE}" = "y" -a -d "${CT_TEST_SUITE_DIR}" ]; then
|
||||
chmod -R u+w "${CT_TEST_SUITE_DIR}"
|
||||
fi
|
||||
|
||||
trap - EXIT
|
||||
|
Loading…
x
Reference in New Issue
Block a user