mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 04:04:45 +00:00
utils: Add kata-manager CLI options for kata and containerd
Add options to `kata-manager.sh` to allow the version of Kata and containerd to be specified. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
3f87835a0e
commit
f4d1e45c33
@ -191,7 +191,9 @@ Description: Install $kata_project [1] and $containerd_project [2] from GitHub r
|
||||
|
||||
Options:
|
||||
|
||||
-c <version> : Specify containerd version.
|
||||
-h : Show this help statement.
|
||||
-k <version> : Specify Kata Containers version.
|
||||
|
||||
Notes:
|
||||
|
||||
@ -562,17 +564,22 @@ handle_args()
|
||||
{
|
||||
local opt
|
||||
|
||||
while getopts "h" opt "$@"
|
||||
local kata_version=""
|
||||
local containerd_version=""
|
||||
|
||||
while getopts "c:hk:" opt "$@"
|
||||
do
|
||||
case "$opt" in
|
||||
c) containerd_version="$OPTARG" ;;
|
||||
h) usage; exit 0 ;;
|
||||
k) kata_version="$OPTARG" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $[$OPTIND-1]
|
||||
|
||||
local kata_version="${1:-}"
|
||||
local containerd_version="${2:-}"
|
||||
[ -z "$kata_version" ] && kata_version="${1:-}" || true
|
||||
[ -z "$containerd_version" ] && containerd_version="${2:-}" || true
|
||||
|
||||
handle_installation \
|
||||
"$kata_version" \
|
||||
|
Loading…
Reference in New Issue
Block a user