diff options
Diffstat (limited to 'src/librefetch/librefetch-makepkg.conf.in')
-rw-r--r-- | src/librefetch/librefetch-makepkg.conf.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/librefetch/librefetch-makepkg.conf.in b/src/librefetch/librefetch-makepkg.conf.in new file mode 100644 index 0000000..723bc15 --- /dev/null +++ b/src/librefetch/librefetch-makepkg.conf.in @@ -0,0 +1,16 @@ +#!/hint/bash + +# This file should be 'source'd by makepkg.conf to enable librefetch +edit_dlagents() { + local dlagent="@bindir@/librefetch -p $(printf %q "$(realpath -Lm "${BUILDFILE:-${BUILDSCRIPT:-PKGBUILD}}")") -- %u %o" + + local i + for i in "${!DLAGENTS[@]}"; do + if [[ "${DLAGENTS[$i]}" = https::* ]]; then + DLAGENTS[$i]="https::$dlagent" + fi + done + DLAGENTS+=("libre::$dlagent") +} +edit_dlagents +unset -f edit_dlagents |