mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
scripts: dev_cli.sh: print help if command unspecified
To improve user friendliness, print help text when no command is given. Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
This commit is contained in:
parent
996bdc6e08
commit
2e94a86b31
@ -168,6 +168,7 @@ process_volumes_args() {
|
||||
exported_volumes="$exported_volumes --volume $var"
|
||||
done
|
||||
}
|
||||
|
||||
cmd_help() {
|
||||
echo ""
|
||||
echo "Cloud Hypervisor $(basename "$0")"
|
||||
@ -625,6 +626,12 @@ cmd_shell() {
|
||||
fix_dir_perms $?
|
||||
}
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
cmd_help
|
||||
say_err "Please specify command to run!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Parse main command line args.
|
||||
#
|
||||
while [ $# -gt 0 ]; do
|
||||
|
Loading…
Reference in New Issue
Block a user