From 0b6103d0489bbceee8ea125e0526c6512f22de50 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Mon, 12 Nov 2018 23:09:58 -0500 Subject: README.org -> READ --- README | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.org | 91 -------------------------------------------------------------- 2 files changed, 88 insertions(+), 91 deletions(-) create mode 100644 README delete mode 100644 README.org diff --git a/README b/README new file mode 100644 index 0000000..7c02ff3 --- /dev/null +++ b/README @@ -0,0 +1,88 @@ +# git-difme + +\[[repo][]\] \[[releases][]\] + +[repo]: https://git.ricketyspace.net/git-difme +[releases]: https://ricketyspace.net/git-difme/releases + +``` +git clone git://git.ricketyspace.net/git-difme.git +``` + +Stages files and makes commits on a list of git repositories based on +some rules. + +It always does a `git push` on each repo that it visits. + +## rules + +The rules specify what type of files to stage and commit. + +A rule can either be a regex that matches a file or a file mod type. + +The following file mod types are recognized: + +- `M`: modified file. +- `D`: deleted file. +- `?`: untracked file. +- `.`: all files. + +The rules are defined per git repository in the config file. + +If git-difme finds already staged files, it'll commit them first +before doing anything. + +## config + +The config file must be at `~/.config/git-difme/config`. + +The config is simply a scheme file that defines the `difme-repos` +function: + + (define (difme-repos) + (list '("/path/to/git/repo/foo" "M" "D" "?") + '("/path/to/git/repo/bar" "M") + '("/path/to/git/repo/baz" ".") + '("/path/to/git/repo/frb" "\\.txt" "personal/log.org" "?") + '("/path/to/git/repo/dot" ".config/"))) + +- For repo `foo`, git-difme will stage and commit modified (M), + deleted (D) and untracked (?) files. +- For repo `bar`, git-difme will only stage and commit modified (M) + files. +- For repo `baz`, git-difme will stage and commit all files (.). +- For repo `frb`, git-difme will stage and commit all files that have + '`.txt`' extension, file(s) whose path matches '`personal/log.org`', + and all untracked files (?). +- For repo `dot`, git-difme will stage and commit all files under the + '`.config`' directory. + +## installing + +### the script + +`git-difme` is written [guile][]. First [install guile][i], then do: + + # make git-difme + +That will install the `git-difme` script git-difme at +`/usr/local/bin`. + +[guile]: https://gnu.org/s/guile +[i]: https://ricketyspace.net/git-difme/install-guile + +### the config file + + $ make config + +That will install a sample config file at `~/.config/git-difme`. + +## running + + $ git-difme + +will do it. + +## license + +GNU GPL version 3 or higher. diff --git a/README.org b/README.org deleted file mode 100644 index 776dc0b..0000000 --- a/README.org +++ /dev/null @@ -1,91 +0,0 @@ -* git-difme - -#+BEGIN_QUOTE -git, do it for me -#+END_QUOTE - -[[[https://git.ricketyspace.net/git-difme][repo]]] [[[https://ricketyspace.net/git-difme/releases][releases]]] - -#+BEGIN_SRC bash -git clone git://git.ricketyspace.net/git-difme.git -#+END_SRC - -stages files and makes commits on a list of git repositories based on -some rules. - -it always does a =git push= on each repo that it visits. - -** rules -the rules specify what type of files to stage and commit. - -a rule can either be a regex that matches a file or a file mod type. - -the following file mod types are recognized: - - - =M= :: modified file. - - =D= :: deleted file. - - =?= :: untracked file. - - =.= :: all files. - -the rules are defined per git repository in the config file. - -if git-difme finds already staged files, it'll commit them first -before doing anything. - -** config -the config file must be at =~/.config/git-difme/config=. - -the config is simply a scheme file that defines the =difme-repos= -function: - -#+BEGIN_SRC scheme -(define (difme-repos) - (list '("/path/to/git/repo/foo" "M" "D" "?") - '("/path/to/git/repo/bar" "M") - '("/path/to/git/repo/baz" ".") - '("/path/to/git/repo/frb" "\\.txt" "personal/log.org" "?") - '("/path/to/git/repo/dot" ".config/"))) -#+END_SRC - -- for repo ~foo~, git-difme will stage and commit modified (M), deleted - (D) and untracked (?) files. -- for repo ~bar~, git-difme will only stage and commit modified (M) - files. -- for repo ~baz~, git-difme will stage and commit all files (.). -- for repo ~frb~, git-difme will stage and commit all files that have - '=.txt=' extension, file(s) whose path matches '=personal/log.org=', and - all untracked files (?). -- for repo ~dot~, git-difme will stage and commit all files under the - '=.config=' directory. - -** installing -*** the script - -=git-difme= is written in [[https://gnu.org/s/guile][guile]]. first [[https://ricketyspace.net/git-difme/install-guile][install guile]], then do: - -#+BEGIN_SRC bash -make git-difme -#+END_SRC - -that will install the =git-difme= script at =~/.bin/git-difme=. - -add =~/.bin/= to =PATH=. - -*** the config file - -#+BEGIN_SRC bash -make config -#+END_SRC - -that will install a sample config file at =~/.config/git-difme=. - -** running - -#+BEGIN_SRC bash -git-difme -#+END_SRC - -will do it. - -** license -gnu general public license version 3 or higher. -- cgit v1.2.3