mirror of
https://github.com/clearlinux/common.git
synced 2026-09-08 06:42:10 +00:00
user-setup: support abs/rel paths for cert options
Support both absolute and relative paths for the cert options, instead of relative paths only, by using realpath(1) to resolve the arguments. (Note that the script cannot reference the path arguments verbatim because much of the script operates in the workspace's toplevel directory, which is a different location than where the script is invoked. In that situation, relative paths would not resolve.) Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
+3
-3
@@ -36,15 +36,15 @@ while [ $# -gt 0 ]; do
|
||||
;;
|
||||
"--client-cert"|"-k")
|
||||
shift
|
||||
PEM="$PWD/$1"
|
||||
PEM="$(realpath $1)"
|
||||
;;
|
||||
"--server-ca"|"-s")
|
||||
shift
|
||||
SERVERCA="$PWD/$1"
|
||||
SERVERCA="$(realpath $1)"
|
||||
;;
|
||||
"--client-ca"|"-c")
|
||||
shift
|
||||
CLIENTCA="$PWD/$1"
|
||||
CLIENTCA="$(realpath $1)"
|
||||
;;
|
||||
"--jobs"|"-j")
|
||||
if echo "$2" | grep -qx "[1-9][0-9]*"; then
|
||||
|
||||
Reference in New Issue
Block a user