fix(setup ghc cross): define variable before use
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
parent
0a460d10c4
commit
db89dd924d
@ -70,10 +70,10 @@ termux_setup_ghc_cross_compiler() {
|
|||||||
echo "Package 'ghc' is not installed."
|
echo "Package 'ghc' is not installed."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
local ON_DEVICE_GHC_BIN="${TERMUX_COMMON_CACHEDIR}/${GHC_PREFIX}-runtime"
|
||||||
export PATH="${ON_DEVICE_GHC_BIN}:${PATH}"
|
export PATH="${ON_DEVICE_GHC_BIN}:${PATH}"
|
||||||
[ -d "${ON_DEVICE_GHC_BIN}" ] && return
|
[ -d "${ON_DEVICE_GHC_BIN}" ] && return
|
||||||
|
|
||||||
local ON_DEVICE_GHC_BIN="${TERMUX_COMMON_CACHEDIR}/${GHC_PREFIX}-runtime"
|
|
||||||
mkdir -p "${ON_DEVICE_GHC_BIN}"
|
mkdir -p "${ON_DEVICE_GHC_BIN}"
|
||||||
for tool in ghc ghc-pkg hsc2hs hp2ps; do
|
for tool in ghc ghc-pkg hsc2hs hp2ps; do
|
||||||
ln -sf "${TERMUX_PREFIX}/bin/${tool}" "${ON_DEVICE_GHC_BIN}/termux-${tool}"
|
ln -sf "${TERMUX_PREFIX}/bin/${tool}" "${ON_DEVICE_GHC_BIN}/termux-${tool}"
|
||||||
|
Loading…
Reference in New Issue
Block a user