#!/bin/sh

#If argument given, chdir into that directory
if [ -n "$1" ]
then
	cd "$1" || exit
fi
echo "Positivizing $PWD..."

# PNG files
for f in `find -iname '*-pos.png'`
do
	NORMAL=`echo "$f" | sed 's|-pos.png|.png|'`

	TARGET_BASE=`basename "$f"`

	ln -f -s "$TARGET_BASE" "$NORMAL"
done

# SVG files
for f in `find -iname '*-pos.svg'`
do
	NORMAL=`echo "$f" | sed 's|-pos.svg|.svg|'`

	TARGET_BASE=`basename "$f"`

	ln -f -s "$TARGET_BASE" "$NORMAL"
done