summaryrefslogtreecommitdiff
path: root/makeself-help-script.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2009-11-23 18:50:22 -0800
committerAaron Plattner <aplattner@nvidia.com>2009-11-23 18:50:22 -0800
commit3cb604acdf3ee68ff6420372d367768b60383d56 (patch)
tree21a81d7f7861db21f2ee4b4d861f9bccdaa3f715 /makeself-help-script.c
parentd5357451067ca1320a41299b2ca12937331267da (diff)
195.22195.22
Diffstat (limited to 'makeself-help-script.c')
-rw-r--r--makeself-help-script.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/makeself-help-script.c b/makeself-help-script.c
new file mode 100644
index 0000000..61ace43
--- /dev/null
+++ b/makeself-help-script.c
@@ -0,0 +1,37 @@
+/*
+ * Implements the '--help-args-only' and '--advanced-options-args-only'
+ * nvidia-installer command line options for use by makeself when
+ * generating the .run file during the 'dist' step.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "nvidia-installer.h"
+#include "help-args.h"
+
+void print_usage(char **argv)
+{
+ fprintf(stderr, "usage: %s --help-args-only|"
+ "--advanced-options-args-only\n", argv[0]);
+}
+
+int main(int argc, char **argv)
+{
+ if (argc != 2) {
+ print_usage(argv);
+ exit(1);
+ }
+
+ if (strcmp(argv[1], "--help-args-only") == 0)
+ print_help_args_only(TRUE, FALSE);
+ else if (strcmp(argv[1], "--advanced-options-args-only") == 0)
+ print_help_args_only(TRUE, TRUE);
+ else {
+ print_usage(argv);
+ exit(1);
+ }
+
+ return 0;
+}