Commit 532cd190 authored by Andrew Gibiansky's avatar Andrew Gibiansky

Merge branch 'master' of github.com:gibiansky/IHaskell

parents 73a6ddd8 eb1670b2
...@@ -32,9 +32,6 @@ fi ...@@ -32,9 +32,6 @@ fi
# What to install. # What to install.
INSTALLS="" INSTALLS=""
# Remove my kernelspec
rm -rf ~/.ipython/kernels/haskell
# Compile dependencies. # Compile dependencies.
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then
if [ $1 = "all" ] || [ $1 = "ihaskell" ]; then if [ $1 = "all" ] || [ $1 = "ihaskell" ]; then
...@@ -58,25 +55,46 @@ if [ $# -gt 0 ]; then ...@@ -58,25 +55,46 @@ if [ $# -gt 0 ]; then
fi fi
fi fi
# Clean all required directories, just in case. cleanup () {
TOP=`pwd` # Remove old kernelspec
for pkg in $INSTALLS rm -rf ~/.ipython/kernels/haskell
do
# Clean all required directories, just in case.
TOP=`pwd`
for pkg in $INSTALLS
do
cd ./$pkg cd ./$pkg
cabal clean cabal clean
cd $TOP cd $TOP
done done
}
# Stick a "./" before everything. install_selected () {
INSTALL_DIRS=`echo $INSTALLS | tr ' ' '\n' | sed 's#^#./#' | tr ' ' '\n'` # Stick a "./" before everything.
INSTALL_DIRS=`echo $INSTALLS | tr ' ' '\n' | sed 's#^#./#' | tr ' ' '\n'`
echo CMD: cabal install --constraint "arithmoi -llvm" -j $INSTALL_DIRS --force-reinstalls --max-backjumps=-1 --reorder-goals echo CMD: cabal install --constraint "arithmoi -llvm" -j $INSTALL_DIRS --force-reinstalls --max-backjumps=-1 --reorder-goals
cabal install --constraint "arithmoi -llvm" -j $INSTALL_DIRS --force-reinstalls --max-backjumps=-1 --reorder-goals cabal install --constraint "arithmoi -llvm" -j $INSTALL_DIRS --force-reinstalls --max-backjumps=-1 --reorder-goals
}
if [ $2 = "no-widgets" ]; then install_widgets () {
echo 'Not installing ihaskell-widgets' echo CMD: cabal install ihaskell-display/ihaskell-widgets
elif [ $1 = "display" ] || [ $1 = "all" ]; then
cabal install ihaskell-display/ihaskell-widgets cabal install ihaskell-display/ihaskell-widgets
}
# Check if arguments are correct, and proceed as required
if [ -z $2 ]; then
cleanup
install_selected
if [ $1 = "display" ] || [ $1 = "all" ]; then
install_widgets
fi
elif [ $2 = "no-widgets" ]; then
cleanup
install_selected
else
print_help
exit 1
fi fi
if hash ihaskell 2>/dev/null; then if hash ihaskell 2>/dev/null; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment