From 7468b6ec0df6aa6c594640154eecb02b12cca5e5 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 26 Dec 2013 23:20:09 -0200 Subject: Support for RELATIVE_FOLDER at git action --- lib/keyringer/actions/git | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/keyringer/actions/git b/lib/keyringer/actions/git index 3c4f435..108ccea 100755 --- a/lib/keyringer/actions/git +++ b/lib/keyringer/actions/git @@ -12,5 +12,13 @@ CWD="`pwd`" # Run git command shift -mkdir -p "$BASEDIR" && cd "$BASEDIR" && git $* + +# Set working folder +if [ ! -z "$RELATIVE_PATH" ]; then + WORK="$KEYDIR/$RELATIVE_PATH" +else + WORK="$BASEDIR" +fi + +mkdir -p "$WORK" && cd "$WORK" && git $* cd "$CWD" -- cgit v1.2.3