#!/bin/bash ### # Install Emacs & Bigloo on Linux Ubuntu branch # Authors: Anon & Chabname GHASSEMI # License: MIT # Source: http://laurentbloch.net/MySpip3/Creer-une-machine-virtuelle-Ubuntu-sous-Windows-et-y-installer-Bigloo ## LOG="/tmp/bigloo-install.log" WORKING_DIR="$HOME/bigloo-install" if [[ ! -f "$LOG" ]] then touch "$LOG" else true > "$LOG" fi echo "1/ Preparing your system." echo -n " - Updating apt cache... " if ! apt-get -q update &>> "$LOG" then echo "fail" echo "Error with updating apt cache." echo "See errors in : $LOG" exit 1 else echo "ok" fi echo -n " - Upgrading your system... " if ! apt-get dist-upgrade -qy &>> "$LOG" then echo "fail" echo "Error with upgrading system" echo "See errors in : $LOG" exit 1 else echo "ok" fi echo -n " - Installing Emacs & required packages... " if ! apt-get install -y gcc make patch emacs binutils diffutils libtool automake wget \ flex bison libssl-dev rlwrap autoconf autogen libunistring2 libgmp10 libgmp3-dev &>> "$LOG" then echo "fail" echo "Error with installing packages." echo "See errors in : $LOG" exit 1 else echo "ok" fi echo "2/ Downloading & installing Bigloo." if [[ ! -d "$WORKING_DIR" ]] then mkdir -p "$WORKING_DIR" cd "$WORKING_DIR" else cd "$WORKING_DIR" fi echo -n " - Downloading Bigloo... " if wget -q ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo-latest.tar.gz then echo "ok" else echo "fail" exit 1 fi echo -n " - Installing Bigloo... " if ! tar xvzf bigloo-latest.tar.gz &>> "$LOG" then echo "fail" echo "Uncompressing bigloo-latest.tar.gz failed" echo "See errors in : $LOG" exit 1 else cd bigloo-latest ./configure &>> "$LOG" make &>> "$LOG" make install &>> "$LOG" make compile-bee &>> "$LOG" make install-bee &>> "$LOG" echo "ok" fi echo -n " - Installing driver for printer to PDF... " if ! apt-get install -y printer-driver-cups-pdf &>> "$LOG" then echo "fail" echo "Error with installing driver for printer to PDF." echo "See errors in : $LOG" exit 1 else echo "ok" fi cd rm -rf "$WORKING_DIR" rm "$LOG"