From 231eb1214c4de9b284edc84124ba8480901f5aa3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:33:48 +0200 Subject: [PATCH] refuse to try to recreate a type Signed-off-by: Nico Schottelius --- bin/cdist-type-template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/cdist-type-template b/bin/cdist-type-template index 772b7486..6d8a3f15 100755 --- a/bin/cdist-type-template +++ b/bin/cdist-type-template @@ -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"