#!/bin/bash
# eqx-delete-project-devices
#
# Usage:
# eqx-delete-project-devices [project name]
# Example:
# eqx-delete-project-devices fooproject

EQXPROJECT="$1"

if [[ $1 == "" ]]
 then	\
	echo -e "Need project name, such as:\n"
	eqx-get-project-names
	echo
	exit
fi

for i in `eqx-get-project-devices-id "$EQXPROJECT"`
do \
	echo "Deleting $i"
	packet device delete --id "$i"
done