Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zdharma-continuum/zinit-annex-patch-dl
Unmaintained mirror of zinit-zsh/z-a-patch-dl
https://github.com/zdharma-continuum/zinit-annex-patch-dl
zinit zinit-annex zsh
Last synced: 2 months ago
JSON representation
Unmaintained mirror of zinit-zsh/z-a-patch-dl
- Host: GitHub
- URL: https://github.com/zdharma-continuum/zinit-annex-patch-dl
- Owner: zdharma-continuum
- License: mit
- Created: 2021-11-01T08:39:57.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-04T10:35:51.000Z (about 1 year ago)
- Last Synced: 2024-04-16T16:22:10.446Z (10 months ago)
- Topics: zinit, zinit-annex, zsh
- Language: Shell
- Homepage:
- Size: 115 KB
- Stars: 3
- Watchers: 2
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zinit-annex-patch-dl
A Zinit extension (i.e., an [annex](https://zdharma-continuum.github.io/zinit/wiki/Annexes/)) that downloads files and
applies patches. It adds two ice modifiers:```zsh
zinit ice dl'{URL} [-> {optional-output-file-name}]; …' …
```and
```zsh
zinit ice patch'{file-name-with-the-patch-to-apply}; …' …
```The Zinit annex (i.e., an extension) will:
- Download the given `{URL}` under the path `{optional-output-file-name}` (if no file name is given, then it is taken
from the last segment of the URL) in case of the `dl''` ice-mod,
- Apply a patch given by the `{file-name-with-the-patch-to-apply}` in case of the `patch''` ice-mod.You can use this functionality to download and apply patches. For example, to install `fbterm`, two patches are being
needed, one to fix the operation, the other one to fix the build:```zsh
zinit ice \
as"command" \
atclone"./configure --prefix=$ZPFX" \
atpull"%atclone" \
dl"https://aur.archlinux.org/cgit/aur.git/plain/0001-Fix-build-with-gcc-6.patch?h=fbterm-git" \
dl"https://bugs.archlinux.org/task/46860?getfile=13513 -> ins.patch" \
make"install" \
patch"ins.patch; 0001-Fix-build-with-gcc-6.patch" \
pick"$ZPFX/bin/fbterm" \
resetzinit load izmntuk/fbterm
```This command will result in:
![fbterm example](https://raw.githubusercontent.com/zdharma-continuum/zinit-annex-patch-dl/master/images/fbterm-ex.png)
## Installation
Run the following command to add the annex to Zinit:
```zsh
zinit light zdharma-continuum/zinit-annex-patch-dl
```After executing this command, you can use the `dl''` and `patch''` ice-mods.