From: Anders Kaseorg Date: Thu, 24 Sep 2009 15:06:33 +0000 (-0400) Subject: pkcs2pem: Handle quoting properly. X-Git-Url: https://snippets.scripts.mit.edu/gitweb.cgi/Scripts/git/.git/commitdiff_plain/bd1c15516d598e60bf5b54e7df9ab268d1be0523 pkcs2pem: Handle quoting properly. Signed-off-by: Anders Kaseorg --- diff --git a/certs/pkcs2pem b/certs/pkcs2pem index 5b9caaa..513b32e 100755 --- a/certs/pkcs2pem +++ b/certs/pkcs2pem @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e @@ -40,7 +40,6 @@ EOF pem=$(readlink -f "$pem") -# No, this doesn't handle quoting properly. -echo HTTPS_CERT_FILE="$pem" -echo HTTPS_KEY_FILE="$pem" +printf 'HTTPS_CERT_FILE=%q\n' "$pem" +printf 'HTTPS_KEY_FILE=%q\n' "$pem"