#!/bin/bash
FOLDER='kdistribution_light1.1.1'
ARCHIVE='kdistribution_light1.1.1.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}
	cd $LOCAL/$FOLDER/data
	mkdir hires_spectra
	ln -s narrowbands_default.in narrowbands.in
	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
