blob: 48ecd01324d133eaeb9f194b3d88d0713eb6af4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env bash # non-executable, but put this there as a hint to text editors
# 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
|