On 11/15/18 9:32 AM, Devin Hussey wrote:
From b9724fc82eda2b0d164c33ad3e871d38b298d1ad Mon Sep 17 00:00:00 2001
From: Devin Hussey <husseyde...@gmail.com>
Date: Thu, 15 Nov 2018 10:30:05 -0500
Subject: [PATCH] Make mktokens accept a random TMPDIR, replace `...` with
  $(...).

Sorry about the multiple commits at once.

Signed-off-by: Devin Hussey <husseyde...@gmail.com>
---
  src/mktokens | 17 ++++++++++-------
  1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/mktokens b/src/mktokens
index cd52241..ec801cc 100644
--- a/src/mktokens
+++ b/src/mktokens
@@ -37,7 +37,10 @@
  # token marks the end of a list.  The third column is the name to print in
  # error messages.

-cat > /tmp/ka$$ <<\!
+# set TMPDIR if it isn't already
+[ -z "${TMPDIR}" ] && TMPDIR="/tmp"

Shorter as:

: "${TMPDIR:=/tmp}"

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to