https://github.com/beatussum/join
A small script allowing to replace patterns in files by the content of other files
https://github.com/beatussum/join
bash shellspec
Last synced: 3 months ago
JSON representation
A small script allowing to replace patterns in files by the content of other files
- Host: GitHub
- URL: https://github.com/beatussum/join
- Owner: beatussum
- License: gpl-3.0
- Created: 2024-07-19T10:37:04.000Z (11 months ago)
- Default Branch: develop
- Last Pushed: 2025-01-20T19:08:58.000Z (5 months ago)
- Last Synced: 2025-01-23T11:42:59.140Z (5 months ago)
- Topics: bash, shellspec
- Language: Shell
- Homepage:
- Size: 131 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
#
join
[](LICENSE)
[](https://github.com/beatussum/join/releases/)[](https://github.com/beatussum/join/actions/workflows/run-check.yml/)
[](https://github.com/beatussum/join/actions/workflows/run-tests.yml/)
[](https://codecov.io/gh/beatussum/join/)
[](https://www.codefactor.io/repository/github/beatussum/join/)## Table of contents
- [What is join?](#what-is-join)
- [Usage](#usage)- [Building](#building)
- [Dependencies](#dependencies)
- [Building process](#building-process)- [Licenses](#licenses)
## What is join?
[**join**](https://github.com/beatussum/join/) is a small script allowing to replace patterns in files by the content of other files.
This script is licensed under GPL-3 or any later version.## Usage
```raw
Usage: join [options...] [--] [patterns...] [--] [inputs...]Options:
-c,--copyright Print copyright information.
-h,--help Print this message.
-l,--lines NUM Set the number of lines to be deleted at the beginning of
each entry to NUM.
-v,--version Print version information.Patterns are defined with the following syntax:
1. @@=
2. @@=
3. @@=""PATTERN must be uppercase.
With the syntax (1), all the entries @PATTERN@ in inputs will be replaced by the
content of file.With the syntax (2), all the entries @PATTERN@ in inputs will be replaced by the
content of all the files in directory.With the syntax (3), all the entries @PATTERN@ in inputs will be replaced by
string. As the shell will probably interpreted double quotes, the latter should
be escaped, e.g. @FOO@='"bar"'.join Copyright (C) 2024 Mattéo Rossillol‑‑Laruelle
This program comes with ABSOLUTELY NO WARRANTY; for details type `join --copyright'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `join --copyright' for details.
```## Building
### Dependencies
- `dev-util/kcov`: only needed for coverage.
- `dev-util/shellspec`[^1]: only needed for testing and coverage.
- `dev-vcs/git`: only needed for building.All other dependencies are already included in **@system**.
### Building process
1. Clone the repository.
```sh
git clone "https://github.com/beatussum/join.git"
```1. **(optional)** Test the program.
```sh
make -C join test
```The JUnit report file is at `build/report/results_junit.xml`.
1. **(optional)** Compute code coverage.
```sh
make -C join coverage
```The output files are in `build/coverage/`.
1. Install the program.
```sh
sudo make -C join DESTDIR= PREFIX= install
```## Licenses
As explained above, the code of this software is licensed under GPL-3 or any later version. Details of the rights applying to the various third-party files are described in the [copyright](copyright) file in [the Debian `debian/copyright` file format](https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/).
[^1]: You can emerge this package by using [my personnal overlay](https://github.com/beatussum/beatussum-overlay/).