#!/bin/sh
#
# Git hook script to remove annoying files created
# by Google Drive and Os X.

n_icon_files=`find . -name Icon? | grep -c /`
if [ $n_icon_files != "0" ]; then
  echo "Will delete $n_icon_files files 'Icon?' generated by Google Drive\n"
  find . -name Icon? -exec rm -f {} \;
fi

n_dsstore_files=`find . -name .DS_Store | grep -c /`
if [ $n_dsstore_files != "0" ]; then
  echo "Will delete $n_dsstore_files files '.DS_Store' generated by Os X\n"
  find . -name .DS_Store -exec rm -f {} \;
fi
