summaryrefslogtreecommitdiff
path: root/src/librefetch/librefetch-makepkg.conf.in
blob: d6bc93ef343ee529a0aa30123745e6887ebfcc60 (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 "${BUILDFILE:-$BUILDSCRIPT}") -- %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