#!/bin/sh
# run specified command if there are more than one ebuild versions
# in current dir

no=0

shopt -s nullglob
for f in *.ebuild; do
	if [[ ${f} != *-9999.ebuild ]]; then
		(( no++ ))
	fi
done

if [[ ${no} -gt 1 ]]; then
	"${@}"
fi
