From: Silvio Rhatto Date: Fri, 27 Dec 2013 01:20:09 +0000 (-0200) Subject: Support for RELATIVE_FOLDER at git action X-Git-Tag: 0.3~13 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=7468b6ec0df6aa6c594640154eecb02b12cca5e5;p=keyringer.git Support for RELATIVE_FOLDER at git action --- 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"