#!/bin/sh
set -e

if [ ! -d kstars/kstars/data ]; then
  echo "You must be in the top-level kdeedu directory."
  exit 1
fi


echo "Processing non-DFSG-free kstars data..."
imgs=`find kstars/kstars/data -maxdepth 1 -name 'm[0-9].png' -o \
  -name 'm[0-9][0-9].png' -o -name 'm[0-9][0-9][0-9].png'`

if [ -z "$imgs" ]; then
  echo "Non-free images not found, perhaps you have already cleaned them out?"
else
  rm $imgs
  echo "Removed."
fi
