#!/bin/bash # exit when any command fails set -e # keep track of the last executed command trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG # echo an error message before exiting trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT [ ! -d "/tmp/install" ] && mkdir /tmp/install cd /tmp/install wget https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.9.6/sratoolkit.2.9.6-ubuntu64.tar.gz gunzip sratoolkit.2.9.6-ubuntu64.tar.gz tar -xvf sratoolkit.2.9.6-ubuntu64.tar cp sratoolkit.2.9.6-ubuntu64/bin/fastq-dump /usr/local/bin/ cp sratoolkit.2.9.6-ubuntu64/bin/prefetch /usr/local/bin/ cd /tmp/install git clone https://github.com/genome/bam-readcount.git cd bam-readcount cmake /tmp/install/bam-readcount make cp /tmp/install/bam-readcount/bin/bam-readcount /usr/local/bin/ cd /tmp/install git clone https://github.com/gpertea/gffcompare cd gffcompare make release cp gffcompare /usr/local/bin/ cp trmap /usr/local/bin # cd /tmp/install # git clone https://github.com/TGAC/KAT.git # cd KAT # ./build_boost.sh # ./autogen.sh # ./configure # make # make install