From 2c981bb6e7f5ddb1b71a2a4e314ba7cd523d857c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 19:22:16 -0500 Subject: Add a utility to add/remove librefetch from makepkg.conf This script is formerly the install script for the bundled-up package. --- src/librefetch/librefetch-makepkg.conf.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/librefetch/librefetch-makepkg.conf.in (limited to 'src/librefetch/librefetch-makepkg.conf.in') diff --git a/src/librefetch/librefetch-makepkg.conf.in b/src/librefetch/librefetch-makepkg.conf.in new file mode 100644 index 0000000..d6bc93e --- /dev/null +++ b/src/librefetch/librefetch-makepkg.conf.in @@ -0,0 +1,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 -- cgit v1.2.2