#!/bin/bash

SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TEXDIR="$HOME/texmf/tex/latex/local"

for styles in $SCRIPTDIR/*; do
	style=${styles##*/}
	if [[ $style != "setup"  ]]; then
		if [[ ! -a "$TEXDIR/$style" ]]; then
			ln -s $SCRIPTDIR/$style $TEXDIR/$style
			echo $style "symlinked to" $TEXDIR/$style
		else
			echo "already exists:" $TEXDIR/$style
		fi
	fi
done
