aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/keyringer/actions/git10
1 files changed, 9 insertions, 1 deletions
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"