mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-02 21:47:29 +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()
|
||||
{
|
||||
case "${1:-}" in
|
||||
-h|--help|help) usage; exit 0;;
|
||||
local opt
|
||||
|
||||
while getopts "h" opt "$@"
|
||||
do
|
||||
case "$opt" in
|
||||
h) usage; exit 0 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $[$OPTIND-1]
|
||||
|
||||
local kata_version="${1:-}"
|
||||
local containerd_version="${2:-}"
|
||||
|
Loading…
Reference in New Issue
Block a user