mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-01 21:24:36 +00:00
utils: Switch kata manager to use getopts
Use `getopts(1)` for command line argument parsing in `kata-manager.sh`. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
a3b3274121
commit
3f87835a0e
@ -560,9 +560,16 @@ handle_installation()
|
|||||||
|
|
||||||
handle_args()
|
handle_args()
|
||||||
{
|
{
|
||||||
case "${1:-}" in
|
local opt
|
||||||
-h|--help|help) usage; exit 0;;
|
|
||||||
esac
|
while getopts "h" opt "$@"
|
||||||
|
do
|
||||||
|
case "$opt" in
|
||||||
|
h) usage; exit 0 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
shift $[$OPTIND-1]
|
||||||
|
|
||||||
local kata_version="${1:-}"
|
local kata_version="${1:-}"
|
||||||
local containerd_version="${2:-}"
|
local containerd_version="${2:-}"
|
||||||
|
Loading…
Reference in New Issue
Block a user