Skip to main content

🌀 Patch DL

An annex downloads files and applies patches and adds two ice-modifiers:


zi ice dl'{URL} [-> {optional-output-file-name}]; â€Ļ' â€Ļ


zi ice patch'{file-name-with-the-patch-to-apply}; â€Ļ' â€Ļ

The annex will download the given {URL} under the path {optional-output-file-name} (if no file name given, then it is taken from last segment of the URL) in case of the dl'â€Ļ' ice-modifier, and apply a patch given by the {file-name-with-the-patch-to-apply} in case of the patch'â€Ļ' ice-modifier. 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:

zi ice as"command" pick"$ZPFX/bin/fbterm" \
dl" -> ins.patch" \
dl"" \
patch"ins.patch; 0001-Fix-build-with-gcc-6.patch" \
atclone"./configure --prefix=$ZPFX" \
atpull"%atclone" make"install" reset
zi load izmntuk/fbterm

This command will result in:

Install patch-dl​

Add the following snippet in the .zshrc file:

zi light z-shell/z-a-patch-dl

This will register the dl'â€Ļ' and patch'â€Ļ' ice-modifiers.