diff --git a/README.rst b/README.rst index 63f7de7..0d00349 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,7 @@ git-archive-all =============== + Synopsis -------- @@ -12,22 +13,34 @@ Synopsis [--fail-missing] [-0 | -1 | -2 | ... | -9 ] [...] - -``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 ------------ diff --git a/test.bats b/test.bats index 51704da..8ed954e 100755 --- a/test.bats +++ b/test.bats @@ -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()