Well, you'll probably need to pass the name of your directory as a variable then?
Something like this?
if [ -d $1 -a -z "$(ls $1)" ]; then echo "empty"
else echo "nope"
Call this script something like scrypt.sh, make it executable and call it with the directory name, like this