Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 610094 Details for
Bug 797113
scl execution is inconvenient
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch for the scl utility
0001-Implement-the-help-command-line-option.patch (text/plain), 1.87 KB, created by
Jaromir Hradilek
on 2012-09-05 16:48:01 UTC
(
hide
)
Description:
Proposed patch for the scl utility
Filename:
MIME Type:
Creator:
Jaromir Hradilek
Created:
2012-09-05 16:48:01 UTC
Size:
1.87 KB
patch
obsolete
>From 5e3504cf0a1cb8a34cdc0efe495280ec6ffc81bb Mon Sep 17 00:00:00 2001 >From: Jaromir Hradilek <jhradilek@redhat.com> >Date: Wed, 5 Sep 2012 15:55:02 +0200 >Subject: [PATCH] Implement the "--help" command line option > >--- > scl.c | 21 +++++++++++++++++++-- > 1 file changed, 19 insertions(+), 2 deletions(-) > >diff --git a/scl.c b/scl.c >index 143bd42..823b3fc 100644 >--- a/scl.c >+++ b/scl.c >@@ -30,6 +30,19 @@ > #include <sys/stat.h> > #include <fcntl.h> > >+static void print_usage( FILE *out, const char *name ) { >+ fprintf(out, "usage: %s <action> [<collection>...] <command>\n", name); >+ fprintf(out, " or: %s -l|--list [<collection>...]\n", name); >+ >+ fprintf(out, "\nOptions:\n" >+ " -l, --list list installed Software Collections or packages\n" >+ " that belong to them\n" >+ " -h, --help display this help and exit\n" >+ "\nActions:\n" >+ " enable enable a Software Collection\n" >+ "\nUse '-' as <command> to read the command from standard input.\n"); >+} >+ > static void check_asprintf( char **strp, const char *fmt, ... ) { > va_list args; > >@@ -233,6 +246,11 @@ int main(int argc, char **argv) { > char *cmd = NULL, *bash_cmd, *echo, *enabled; > int i, tfd, ffd, stdin_read = 0; > >+ if (argc == 2 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h"))) { >+ print_usage(stdout, argv[0]); >+ exit(EXIT_SUCCESS); >+ } >+ > if (argc >= 2 && (!strcmp(argv[1],"--list") || !strcmp(argv[1],"-l"))) { > if (argc == 2) { > list_collections(); >@@ -275,8 +293,7 @@ int main(int argc, char **argv) { > > if (!stdin_read) { > if (argc < 4) { >- fprintf(stderr, "Usage: %s <action> [<collection1>, <collection2> ...] <command>\n" >- "If <command> is '-' then the command will be read from standard input.\n", argv[0]); >+ print_usage(stderr, argv[0]); > exit(EXIT_FAILURE); > } > cmd = strdup(argv[argc-1]); >-- >1.7.11.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 797113
: 610094