diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-06-25 15:12:14 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-06-27 13:26:21 -0700 |
commit | afe955cbd1dab48cf15a5a9b3f033d47d87720f4 (patch) | |
tree | d2ff5bbddf94471e8f29015d90fbf71d22e84702 /src/connection.lisp | |
parent | 911bb7fc7597a83d1453ae083e33d7eaa8640f6b (diff) | |
download | consfigurator-afe955cbd1dab48cf15a5a9b3f033d47d87720f4.tar.gz |
convert some internal shell snippets to single lines
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection.lisp')
-rw-r--r-- | src/connection.lisp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/connection.lisp b/src/connection.lisp index 7db2413..b03e33e 100644 --- a/src/connection.lisp +++ b/src/connection.lisp @@ -318,7 +318,8 @@ which will be cleaned up when BODY is finished." ;; ;; While GNU M4 mkstemp makes the temporary file at most readable and ;; writeable by its owner, POSIX doesn't require this, so set a umask. - #?"umask 077 + (sh-script-to-single-line + #?"umask 077 exec 3>&1 if err=\$(if command -v m4 >/dev/null; then echo 'mkstemp(${template})' | m4 2>&1 1>&3 @@ -334,7 +335,7 @@ else ?*) printf >&2 \"%s\\n\" \"$err\" ;; esac exit 1 -fi") +fi")) (defun mktemp (&key (connection *connection*) directory) "Make a temporary file on the remote side, in DIRECTORY, defaulting to /tmp." |