From 6b52357dc755bb6b6ace8491dfd36ee8065e02e9 Mon Sep 17 00:00:00 2001 From: Henning Schild Date: Thu, 25 Feb 2021 20:42:27 +0100 Subject: [PATCH] kas-container: add an argument to get version information This script is deployed in many copies, give people a way to identify which one they have cached/installed. Signed-off-by: Henning Schild [Jan: simplify and use basename for the program] Signed-off-by: Jan Kiszka --- kas-container | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kas-container b/kas-container index b149c1c..bf58609 100755 --- a/kas-container +++ b/kas-container @@ -46,6 +46,7 @@ usage() printf "%b" "--docker-args\t\tSame as --runtime-args (deprecated).\n" printf "%b" "-d\t\t\tPrint debug output.\n" printf "%b" "-v\t\t\tSame as -d (deprecated).\n" + printf "%b" "--version\t\tprint program version.\n" printf "%b" "--ssh-dir\t\tDirectory containing SSH configurations.\n" printf "%b" "\t\t\tAvoid \$HOME/.ssh unless you fully trust the " \ "container.\n" @@ -173,6 +174,10 @@ while [ $# -gt 0 ]; do KAS_OPTIONS_DIRECT="${KAS_OPTIONS_DIRECT} -d" shift 1 ;; + --version) + echo "$(basename "$0") $KAS_IMAGE_VERSION_DEFAULT" + exit 0 + ;; --*) usage ;;