#!/bin/sh
usage() {
+ echo ""
echo "Usage:"
echo "id-new-project.sh srcdir description {pub/private}"
echo "For example:"
DESC=$2
TYPE=$3
-if test -z "${TYPE}"; then
- usage
-fi
+case "${TYPE}" in
+ pub | private) ;;
+ * ) echo "invalid type: '$TYPE', use pub or private"; usage ;;
+esac
if test ! -e post-receive; then
echo "file post-receive must be in the current directory"