mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-15 04:33:08 +02:00
qpkg/qpkg.c (main): show usage if there are no arguments or any options
This commit is contained in:
parent
43b9dc1972
commit
c90fcba126
@ -111,9 +111,13 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int arg;
|
int arg;
|
||||||
|
|
||||||
|
if (argc == 1)
|
||||||
|
usage(*argv);
|
||||||
packages = make_tree(comp_id);
|
packages = make_tree(comp_id);
|
||||||
versions = make_tree(comp_id);
|
versions = make_tree(comp_id);
|
||||||
for (arg = 1; arg != argc; arg++) {
|
for (arg = 1; arg != argc; arg++) {
|
||||||
|
if (*argv[arg] == '-')
|
||||||
|
usage(*argv);
|
||||||
if (!strcmp(argv[arg], "list")) {
|
if (!strcmp(argv[arg], "list")) {
|
||||||
switch (argc-arg) {
|
switch (argc-arg) {
|
||||||
case 1:
|
case 1:
|
||||||
|
Loading…
Reference in New Issue
Block a user