diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-09-30 00:27:23 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-01 17:35:22 -0400 |
commit | 4014f6c2cc579645aac56f51aa6063db7815c3a8 (patch) | |
tree | 549afea90ba2a0283c1507cd276a28d3e4fb243a /test/pkgbuild-check-nonfree-test.sh | |
parent | 61e61226d8aeb2a973656a263cd0c523e9e55c88 (diff) |
test: Clean up (config) file writing
Instead of using in inconsistent mish-mash of `mkdir` and `echo >` and
`printf >>`, use more readable and identifiable indented-heredocs:
install -Dm644 /dev/stdin "FILENAME" <<-eot
CONTENTS
eot
Diffstat (limited to 'test/pkgbuild-check-nonfree-test.sh')
-rw-r--r-- | test/pkgbuild-check-nonfree-test.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/pkgbuild-check-nonfree-test.sh b/test/pkgbuild-check-nonfree-test.sh index 306ab00..ec1246e 100644 --- a/test/pkgbuild-check-nonfree-test.sh +++ b/test/pkgbuild-check-nonfree-test.sh @@ -6,13 +6,14 @@ describe pkgbuild-check-nonfree before() { common_before - mkdir -p $XDG_CONFIG_HOME/libretools - echo "BLACKLIST='phony://example.com'" >$XDG_CONFIG_HOME/libretools/libretools.conf - - local blacklist=$XDG_CACHE_HOME/libretools/blacklist.txt - mkdir -p "${blacklist%/*}" - echo 'linux:linux-libre:nonfree blobs and firmwares' >$blacklist - echo 'skype' >>$blacklist + install -Dm644 /dev/stdin "$XDG_CONFIG_HOME/libretools/libretools.conf" <<-eot + BLACKLIST='phony://example.com' + eot + + install -Dm644 /dev/stdin "$XDG_CACHE_HOME/libretools/blacklist.txt" <<-eot + linux:linux-libre:nonfree blobs and firmwares + skype + eot } it_displays_usage_text() { |