fix(setup ghc cross): define variable before use

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
Aditya Alok 2022-03-08 10:38:14 +05:30 committed by xtkoba
parent 0a460d10c4
commit db89dd924d
1 changed files with 1 additions and 1 deletions

View File

@ -70,10 +70,10 @@ termux_setup_ghc_cross_compiler() {
echo "Package 'ghc' is not installed."
exit 1
else
local ON_DEVICE_GHC_BIN="${TERMUX_COMMON_CACHEDIR}/${GHC_PREFIX}-runtime"
export PATH="${ON_DEVICE_GHC_BIN}:${PATH}"
[ -d "${ON_DEVICE_GHC_BIN}" ] && return
local ON_DEVICE_GHC_BIN="${TERMUX_COMMON_CACHEDIR}/${GHC_PREFIX}-runtime"
mkdir -p "${ON_DEVICE_GHC_BIN}"
for tool in ghc ghc-pkg hsc2hs hp2ps; do
ln -sf "${TERMUX_PREFIX}/bin/${tool}" "${ON_DEVICE_GHC_BIN}/termux-${tool}"