fix(setup ghc cross compiler): run __termux_haskell_register_packages
only when ghc has been setup
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
parent
a5f9e8199a
commit
6137422df7
@ -46,10 +46,9 @@ termux_setup_ghc_cross_compiler() {
|
|||||||
termux_error_exit "Package 'ghc-libs' is not installed. It is required by GHC cross-compiler." \
|
termux_error_exit "Package 'ghc-libs' is not installed. It is required by GHC cross-compiler." \
|
||||||
"You should specify it in 'TERMUX_PKG_BUILD_DEPENDS'."
|
"You should specify it in 'TERMUX_PKG_BUILD_DEPENDS'."
|
||||||
|
|
||||||
__termux_haskell_register_packages
|
|
||||||
|
|
||||||
if [[ -d "${TERMUX_GHC_RUNTIME_FOLDER}" ]]; then
|
if [[ -d "${TERMUX_GHC_RUNTIME_FOLDER}" ]]; then
|
||||||
__termux_haskell_eval_custom_build "${TERMUX_GHC_RUNTIME_FOLDER}/bin/${TERMUX_ARCH}"
|
__termux_haskell_eval_custom_build "${TERMUX_GHC_RUNTIME_FOLDER}/bin/${TERMUX_ARCH}"
|
||||||
|
__termux_haskell_register_packages
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -91,6 +90,7 @@ termux_setup_ghc_cross_compiler() {
|
|||||||
# timestamp creation, we need to remove it in massage step.
|
# timestamp creation, we need to remove it in massage step.
|
||||||
|
|
||||||
__termux_haskell_eval_custom_build "${TERMUX_GHC_RUNTIME_FOLDER}/bin/${TERMUX_ARCH}"
|
__termux_haskell_eval_custom_build "${TERMUX_GHC_RUNTIME_FOLDER}/bin/${TERMUX_ARCH}"
|
||||||
|
__termux_haskell_register_packages
|
||||||
|
|
||||||
rm "${TERMUX_GHC_TAR}"
|
rm "${TERMUX_GHC_TAR}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user