]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Support for RELATIVE_FOLDER at git action
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 27 Dec 2013 01:20:09 +0000 (23:20 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 27 Dec 2013 01:20:09 +0000 (23:20 -0200)
lib/keyringer/actions/git

index 3c4f4357640147f93261c82b9d86a0f59b028e94..108cceacc65e79748612b808422411ba88136091 100755 (executable)
@@ -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"