#!/bin/bash FOLDER='kdistribution1.0.5' ARCHIVE='kdistribution1.0.5.tgz' LOCAL=$('pwd') if [ -e $FOLDER ] then echo "Directory already exists:" echo $FOLDER echo "Please erase it and try again" exit 0 else tar -zxvf ${ARCHIVE} if [ -e ./kspectrum* ] then cd ./kspectrum* KSPEC=$('pwd') echo "" echo "KSPECTRUM found in directory:" echo $KSPEC cd $LOCAL/$FOLDER/data ln -s $KSPEC/data/composition.in . ln -s $KSPEC/data/narrowbands.in . ln -s $KSPEC/results ./hires_spectrum else echo "KSPECTRUM directory not found" fi cd $LOCAL rm -f ${ARCHIVE} rm -f install_kdistribution*.bash fi echo "" echo "The archive was extracted in: ./"$FOLDER echo "Use documentation file "Doc/manual.pdf" if needed" exit 0