summaryrefslogtreecommitdiff
path: root/test/libremakepkg-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/libremakepkg-test.sh')
-rw-r--r--test/libremakepkg-test.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh
index ce3aa80..a1955bc 100644
--- a/test/libremakepkg-test.sh
+++ b/test/libremakepkg-test.sh
@@ -136,7 +136,9 @@ it_detects_distcc_files() {
cp libremakepkg.d/PKGBUILD-hello "$tmpdir/PKGBUILD"
cd "$tmpdir"
- echo "CHROOTEXTRAPKG+=(distcc-nozeroconf socat)" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
+ cat >> "$XDG_CONFIG_HOME/libretools/chroot.conf" <<-eot
+ CHROOTEXTRAPKG+=(distcc-nozeroconf socat)
+ eot
trap 'sed -i /CHROOTEXTRAPKGs+=/d "$XDG_CONFIG_HOME"/libretools/chroot.conf' RETURN
libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
testsudo librechroot -l "$roundup_test_name" install-name distcc-nozeroconf socat
@@ -156,12 +158,13 @@ it_detects_distcc_files() {
it_doesnt_symlink_outputs() {
require network sudo || return 0
- echo "WORKDIR='$tmpdir/workdir'" > $XDG_CONFIG_HOME/libretools/libretools.conf
- mkdir -p $XDG_CONFIG_HOME/pacman
- {
- printf 'PKGDEST=%q\n' "$tmpdir/workdir/pkgdest"
- printf 'SRCPKGDEST=%q\n' "$tmpdir/workdir/srcpkgdest"
- } >$XDG_CONFIG_HOME/pacman/makepkg.conf
+ install -Dm644 /dev/stdin "$XDG_CONFIG_HOME/libretools/libretools.conf" <<-eot
+ WORKDIR=${tmpdir@Q}/workdir
+ eot
+ install -Dm644 /dev/stdin "$XDG_CONFIG_HOME/pacman/makepkg.conf" <<-eot
+ PKGDEST=${tmpdir@Q}/workdir/pkgdest
+ SRCPKGDEST=${tmpdir@Q}/workdir/srcpkgdest
+ eot
trap 'rm -f -- "$XDG_CONFIG_HOME/libretools/libretools.conf" "$XDG_CONFIG_HOME/pacman/makepkg.conf"' RETURN
cp libremakepkg.d/PKGBUILD-hello "$tmpdir/PKGBUILD"