aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/install.c b/scripts/install.c
index a9a05500..3ffb867d 100644
--- a/scripts/install.c
+++ b/scripts/install.c
@@ -3,28 +3,26 @@
* Copyright 2006 Rob Landley <rob@landley.net>
*/
-#include "toys.h"
+#include <stdio.h>
+#include "generated/config.h"
+#include "lib/toyflags.h"
-#undef NEWTOY
-#undef OLDTOY
-#define NEWTOY(name, opts, flags) {#name, 0, 0, flags},
-#define OLDTOY(name, oldname, flags) {#name, 0, 0, flags},
+#define NEWTOY(name, opts, flags) {#name, flags},
+#define OLDTOY(name, oldname, flags) {#name, flags},
// Populate toy_list[].
-struct toy_list toy_list[] = {
+struct {char *name; int flags;} toy_list[] = {
#include "generated/newtoys.h"
};
-#define TOY_LIST_LEN (sizeof(toy_list)/sizeof(struct toy_list))
-
int main(int argc, char *argv[])
{
static char *toy_paths[]={"usr/","bin/","sbin/",0};
int i, len = 0;
// Output list of applets.
- for (i=1; i<TOY_LIST_LEN; i++) {
+ for (i=1; i<sizeof(toy_list)/sizeof(*toy_list); i++) {
int fl = toy_list[i].flags;
if (fl & TOYMASK_LOCATION) {
if (argc>1) {