From 211363d5be5bc9d4847edc2b663528f06ce4fae9 Mon Sep 17 00:00:00 2001 From: nuex Date: Sun, 16 Jun 2013 01:40:11 -0400 Subject: [PATCH] __git: quote variables in gencode-remote, add optional parameters in manpage --- cdist/conf/type/__git/gencode-remote | 10 +++++----- cdist/conf/type/__git/man.text | 9 +++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/cdist/conf/type/__git/gencode-remote b/cdist/conf/type/__git/gencode-remote index bc0c66cc..d719a492 100644 --- a/cdist/conf/type/__git/gencode-remote +++ b/cdist/conf/type/__git/gencode-remote @@ -51,12 +51,12 @@ case $state_should in if [ "$state_should" != "$state_is" ]; then echo git clone --quiet --branch "$branch" "$source" "$destination" fi - if [ \( -n ${owner} -a "$owner_is" != "$owner" \) -o \ - \( -n ${group} -a "$group_is" != "$group" \) ]; then - echo chown -R ${owner}:${group} ${destination} + if [ \( -n "$owner" -a "$owner_is" != "$owner" \) -o \ + \( -n "$group" -a "$group_is" != "$group" \) ]; then + echo chown -R "${owner}:${group}" "$destination" fi - if [ -n ${mode} ]; then - echo chmod -R ${mode} ${destination} + if [ -n "$mode" ]; then + echo chmod -R "$mode" "$destination" fi ;; # Handled in manifest diff --git a/cdist/conf/type/__git/man.text b/cdist/conf/type/__git/man.text index 5597a52d..7c6b83cd 100644 --- a/cdist/conf/type/__git/man.text +++ b/cdist/conf/type/__git/man.text @@ -27,6 +27,15 @@ state:: branch:: Create this branch by checking out the remote branch of this name +group:: + Group to chgrp to. + +mode:: + Unix permissions, suitable for chmod. + +owner:: + User to chown to. + EXAMPLES --------