Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
roehling committed Mar 6, 2020
1 parent 458b1b1 commit 61484ab
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 7 deletions.
27 changes: 20 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
git-archive-all
===============


Synopsis
--------

Expand All @@ -12,22 +13,34 @@ Synopsis
[--fail-missing] [-0 | -1 | -2 | ... | -9 ]
<tree-ish> [<path>...]


``git archive-all`` works similar to ``git archive``, but will also include
**git archive-all** works similar to ``git archive``, but will also include
files from submodules into the archive. This is not the only implementation of
this particular feature, but it is the one that mimics ``git archive`` best.
It uses the same command line arguments, and in the absense of submodules, it
will behave identically. Basically, you can use it for all archiving purposes
and need not think about the technicalities of submodules.


Installation
------------

Just place the ``git-archive-all`` bash script in a location that is in your
``$PATH``. If you have root privileges, ``/usr/local/bin`` is a reasonable
choice. Otherwise, you may be able to use ``$HOME/.local/bin`` to the same
effect, or you can call the script directly without installing it first, albeit
less conveniently.
You can run ``make install`` to install **git-archive-all** and its manual
page. By default, the Makefile will pick ``/usr/local`` as install prefix if
run as root, and ``$HOME/.local`` otherwise. You can override that choice with
``make install prefix=/path/to/other/prefix``.

The install script needs ``pod2man`` from the Perl distribution to generate the
manual page.


Testing
-------

**git-archive-all** comes with a small
[Bats](https://github.com/bats-core/bats-core) test suite. You can run the test
suite with ``./test.bats`` if you have installed Bats, e.g. with ``sudo apt
install bats``.


Alternatives
------------
Expand Down
23 changes: 23 additions & 0 deletions test.bats
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
#!/usr/bin/env bats
# vim: filetype=bash:
#
# GIT-ARCHIVE-ALL
#
# Copyright (c) 2019 Timo Röhling
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
GIT_ARCHIVE_ALL="$(pwd)/git-archive-all"

repo_files()
Expand Down

0 comments on commit 61484ab

Please sign in to comment.