#!/bin/bash

build_dir=$1
external_dir=$2

echo "build dir : $build_dir"
echo "external dir : $external_dir"

for file in ${external_dir}*
do
	base_file=`basename $file`
	full_file=`compgen -f ${build_dir}/${base_file}-*`
	#echo "Processing $base_file"
	#echo "  >> $full_file"
	if [ -n "$full_file" ]; then
  		# Do something when var is non-zero length
		rm ${full_file}/.stamp_built
	fi
done
