diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index 262e34b306..e03ab13032 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -175,10 +175,14 @@ native_install () { install_pkgs } +cross_path () { + PATH=$HOME/.ghc/android-14/arm-linux-androideabi-4.7/bin:$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:$PATH +} + cross_install () { echo "Cross install" native= - PATH=$HOME/.ghc/android-14/arm-linux-androideabi-4.7/bin:$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:$PATH + cross_path if [ ! -e $HOME/.ghc/android-14/arm-linux-androideabi-4.7/cabal/packages/hackage.haskell.org ]; then cabal update fi @@ -192,6 +196,14 @@ case "$mode" in cross) cross_install ;; + cleancross) + # cross install, first removing all currently installed + # packages except those part of ghc + rm -f $(grep -l $HOME/.ghc/android-14/arm-linux-androideabi-4.7/.cabal/lib/ $HOME/.ghc/android-14/arm-linux-androideabi-4.7/lib/ghc-*/package.conf.d/*.conf) + cross_path + ghc-pkg recache + cross_install + ;; "") cross_install native_install