summaryrefslogtreecommitdiff
path: root/standalone/android/install-haskell-packages
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-08 12:23:38 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-08 12:23:38 -0400
commitf66cb308a645aaac6357a7be7090de24ddbce8e7 (patch)
tree9908e8306587dd42b17fbb27f968a9cc62088d15 /standalone/android/install-haskell-packages
parent7151a217cc4cd47bb9c0d97f2c54ca695290b745 (diff)
split native and cross builds
Diffstat (limited to 'standalone/android/install-haskell-packages')
-rwxr-xr-xstandalone/android/install-haskell-packages31
1 files changed, 16 insertions, 15 deletions
diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages
index 4ff22d0b5..debd1570a 100755
--- a/standalone/android/install-haskell-packages
+++ b/standalone/android/install-haskell-packages
@@ -8,8 +8,9 @@
# Needs some extra C libraries to be installed inside the cross-compiler
# lib directory: libgnutls libxml2
#
-# The same versions are also installed in the host system. This is needed
-# in order to use the EvilSplicer to expand Template Haskell.
+# When run with "native" as a parameter, the same versions are installed
+# in the host system. This is needed in order to use the EvilSplicer to
+# expand Template Haskell.
# lib dir
set -e
@@ -146,17 +147,17 @@ install_pkgs () {
rm -rf tmp
}
-# First, the native build.
-native=1
-if [ ! -e $HOME/.cabal/packages/hackage.haskell.org ]; then
- cabal update
-fi
-install_pkgs
-
-# Now the cross compile.
-native=0
-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
-if [ ! -e $HOME/.ghc/android-14/arm-linux-androideabi-4.7/cabal/packages/hackage.haskell.org ]; then
- cabal update
+if [ "$1" = native ]; then
+ native=1
+ if [ ! -e $HOME/.cabal/packages/hackage.haskell.org ]; then
+ cabal update
+ fi
+ install_pkgs
+else
+ native=0
+ 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
+ if [ ! -e $HOME/.ghc/android-14/arm-linux-androideabi-4.7/cabal/packages/hackage.haskell.org ]; then
+ cabal update
+ fi
+ install_pkgs
fi
-install_pkgs