refuse to try to recreate a type

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-04-16 23:33:48 +02:00
parent 10ebdd87d4
commit 231eb1214c
1 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,10 @@ set -eu
__cdist_type="$1"; shift
__cdist_my_type_dir="$(__cdist_type_dir "$__cdist_type")"
if [ -d "$__cdist_my_type_dir" ]; then
__cdist_usage "Type $__cdist_type already exists"
fi
echo "Creating type $__cdist_type in $__cdist_my_type_dir ..."
# Base
mkdir -p "$__cdist_my_type_dir"