1 /* Wrapper to make installation easier with cross-compiling.
3 * Copyright 2006 Rob Landley <rob@landley.net>
10 #define NEWTOY(name, opts, flags) {#name, 0, opts, flags},
11 #define OLDTOY(name, oldname, opts, flags) {#name, 0, opts, flags},
13 // Populate toy_list[].
15 struct toy_list toy_list[] = {
16 #include "generated/newtoys.h"
19 #define TOY_LIST_LEN (sizeof(toy_list)/sizeof(struct toy_list))
21 int main(int argc, char *argv[])
23 static char *toy_paths[]={"usr/","bin/","sbin/",0};
26 // Output list of applets.
27 for (i=1; i<TOY_LIST_LEN; i++) {
28 int fl = toy_list[i].flags;
29 if (fl & TOYMASK_LOCATION) {
32 for (j=0; toy_paths[j]; j++)
33 if (fl & (1<<j)) len += printf("%s", toy_paths[j]);
35 len += printf("%s\n",toy_list[i].name);