# # Installs the latest SRA tools # set -ue # Select the download based on the platform. if [ "$(uname)" == "Darwin" ]; then SRA_NAME=sratoolkit.3.0.0-mac64 else SRA_NAME=sratoolkit.3.0.0-ubuntu64 fi # The SRA libraries. SRA_TAR=${SRA_NAME}.tar.gz # The SRA urls. SRA_URL=https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/3.0.0/${SRA_TAR} # The location of the binaries BIN=~/bin # Create the bin directory mkdir -p ${BIN} # Download the library (cd ${BIN} && (curl ${SRA_URL} > ${SRA_TAR})) # Unpack the software. (cd ${BIN} && tar zxf ${SRA_TAR}) # The bash profile PROFILE=~/.bash_profile # Alter the PATH if necessary. grep -qF ${SRA_NAME} ${PROFILE} || echo "export PATH=~/bin/${SRA_NAME}/bin:\$PATH" >> ${PROFILE} echo "#" echo "# Installation complete " echo "#" echo "# Close and reopen the terminal." echo "#" echo "# In the new terminal activate the bioinfo environment." echo "#"