Move usage information printing to separate function, and print usage to stderr; also added some spacing.
This commit is contained in:
parent
63f3392ff5
commit
17d274ef48
@ -20,8 +20,8 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ $# -lt 2 ] ; then
|
function print_usage(){
|
||||||
cat <<USAGE
|
cat >&2 <<USAGE
|
||||||
Usage: $0 vmname command arguments
|
Usage: $0 vmname command arguments
|
||||||
Executes a command in another VM using the qubes.VMShell RPC service. The
|
Executes a command in another VM using the qubes.VMShell RPC service. The
|
||||||
arguments are joined with spaces and passed to "bash -c".
|
arguments are joined with spaces and passed to "bash -c".
|
||||||
@ -33,10 +33,16 @@ is your terminal.
|
|||||||
|
|
||||||
You can use \$dispvm or --dispvm instead of vmname to start a new DisposableVM.
|
You can use \$dispvm or --dispvm instead of vmname to start a new DisposableVM.
|
||||||
USAGE
|
USAGE
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -lt 2 ] ; then
|
||||||
|
print_usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VMNAME=$1
|
VMNAME=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if [ $VMNAME = "--dispvm" ] ; then
|
if [ $VMNAME = "--dispvm" ] ; then
|
||||||
VMNAME='$dispvm'
|
VMNAME='$dispvm'
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user