#!/bin/bash
FOLDER="$1"
src="/data2/www/gpsmet.umd.edu/icvs_gnssro/$FOLDER"

if [[ ! -d $src ]]; then
	echo "Error: $FOLDER does not exist"
	exit 1
fi

if [[ -d ./"$FOLDER"$ ]]; then
	echo "Error: $FOLDER exists in current directory"
	exit 1
fi

mkdir "$FOLDER"
cd "$FOLDER"
ln -s ../index.html
ln -s ../index_level2a.html
ln -s ../index_level2b.html
ln -s "$src"/date_define.js
ln -s "$src"/data

echo "Successfully linked"
