1
0
Fork 0
mirror of https://github.com/zdharma-continuum/zinit-annex-patch-dl.git synced 2025-01-30 08:58:21 +01:00
Unmaintained mirror of zinit-zsh/z-a-patch-dl
Find a file
Vladislav Doster 71218022d9 fix: log message convention
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
2023-12-04 04:35:48 -06:00
.github/workflows feat: add lint gh action workflow (#13) 2023-04-15 23:46:04 -05:00
images images: fbterm-ex.png 2019-09-10 01:19:00 +02:00
.gitignore .gitignore 2020-02-18 02:51:10 +01:00
LICENSE Initial commit 2019-09-08 04:33:28 +02:00
README.md style: format zsh and markdown to zinit convention (#3) 2022-06-26 16:51:29 -05:00
z-a-patch-dl.plugin.zsh fix: consistent logging format (#14) 2023-04-28 17:17:54 -05:00
za-patch-dl-handler fix: log message convention 2023-12-04 04:35:48 -06:00

zinit-annex-patch-dl

A Zinit extension (i.e., an annex) that downloads files and applies patches. It adds two ice modifiers:

zinit ice dl'{URL} [-> {optional-output-file-name}]; …'

and

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:

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" \
    reset

zinit load izmntuk/fbterm

This command will result in:

fbterm example

Installation

Run the following command to add the annex to Zinit:

zinit light zdharma-continuum/zinit-annex-patch-dl

After executing this command, you can use the dl'' and patch'' ice-mods.