git-difme

git do it for me - ricketyspace.net/git-difme
git clone git://git.ricketyspace.net/git-difme.git
Log | Files | Refs

commit dcd3d99f8be71994aca50468f3e6151e6a544a41
parent fd87baf2fc35e73ee09f5268b67a1ead2f43d72a
Author: rsiddharth <s@ricketyspace.net>
Date:   Sun, 10 Jul 2016 02:46:50 +0000

add difme worker functions.

* git-scm (build-stage-regex, work-difme): new functions.
(difme): new function; incomplete.

Diffstat:
git-difme.scm | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/git-difme.scm b/git-difme.scm @@ -117,6 +117,27 @@ the commit message will be in the following format: (with-directory-excursion repo (difme-exec cmd)))) +;;;; difme workers +(define (build-stage-regex rules) + "build stage regex based on RULES." + (let ((regex "^")) + (cond ((null? rules) (string-append regex ".")) + (else (string-append + regex "[" (string-concatenate rules) "]"))))) + +(define (difme repo) + "stage and commit relevant files in REPO. + +also does `git push` to the REPO' default upstream remote." + (let* ((path (car repo)) + (rules (cdr repo)) + (stage-regex (build-stage-regex rules))) + stage-regex)) + +(define (walk-difme repos) + "walk through each difme repo in REPOS and `difme` it." + (map difme repos)) + ;;;; main (define (main srcs) "zarking main."