From 229aab510a2126a83b94e858b064b0df4072533d Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 5 May 2020 11:30:37 +0200 Subject: [PATCH] Emit errors if files are missing --- shellpki | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shellpki b/shellpki index 8ea6c07..7b10969 100755 --- a/shellpki +++ b/shellpki @@ -251,7 +251,7 @@ create() { # csr-file option, with value separated by space if [ -n "$2" ]; then from_csr=1 - csr_file=$(readlink -f -- "${2}") + csr_file=$(readlink --canonicalize --verbose -- "${2}") shift else printf 'ERROR: "--csr-file" requires a non-empty option argument.\n' >&2 @@ -261,7 +261,7 @@ create() { --file=?*|--csr-file=?*) from_csr=1 # csr-file option, with value separated by = - csr_file=$(readlink -f -- "${1#*=}") + csr_file=$(readlink --canonicalize --verbose -- "${1#*=}") ;; --file=|--csr-file=) # csr-file options, without value @@ -274,7 +274,7 @@ create() { --password-file) # password-file option, with value separated by space if [ -n "$2" ]; then - password_file=$(readlink -f -- "${2}") + password_file=$(readlink --canonicalize --verbose -- "${2}") shift else printf 'ERROR: "--password-file" requires a non-empty option argument.\n' >&2 @@ -283,7 +283,7 @@ create() { ;; --password-file=?*) # password-file option, with value separated by = - password_file=$(readlink -f -- "${1#*=}") + password_file=$(readlink --canonicalize --verbose -- "${1#*=}") ;; --password-file=) # password-file options, without value