How to install newest version of hledger web in Ubuntu 14.04 LTS

Posted: 2015/01/03 in Ubuntu
Tags: , , , ,
rm -rf ~/.ghc ~/.cabal
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-get purge  ghc cabal-install
sudo add-apt-repository -y ppa:hvr/ghc
sudo apt-get update
CABALFILENAME=`apt-cache search cabal-install |tail -n 1|cut -d" " -f1`
CABALVERSION=`apt-cache search cabal-install |tail -n 1|cut -d" " -f1|cut -d"-" -f3`
GHCFILENAME=`apt-cache search ^ghc|tail -4|head -n 1|cut -d" " -f1`
GHCVERSION=`apt-cache search ^ghc|tail -4|head -n 1|cut -d" " -f1|cut -d"-" -f2`
sudo apt-get install -y `echo $CABALFILENAME`  `echo $GHCFILENAME`
cat >> ~/.bashrc <<EOF
export PATH=~/.cabal/bin:/opt/cabal/`echo $CABALVERSION`/bin:/opt/ghc/`echo $GHCVERSION`/bin:$PATH
export PATH=~/.cabal/bin:/opt/cabal/`echo $CABALVERSION`/bin:/opt/ghc/`echo $GHCVERSION`/bin:$PATH
cabal update
cabal install alex happy
# Open a new Terminal and run the following commands in the new Terminal window:
 cabal install hledger-web -j
 touch ~/.hledger.journal
 hledger web

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s