/* Conditionally execute a command based on machine and OS from config.h */
# include "config.h"
# include <stdio.h>
int main(argc, argv, envp)
int argc;
char ** argv;
char ** envp;
{
if (argc < 4) goto Usage;
if (strcmp(MACH←TYPE, argv[1]) != 0) return(0);
if (strcmp(OS←TYPE, "") != 0 && strcmp(argv[2], "") != 0
&& strcmp(OS←TYPE, argv[2]) != 0) return(0);
execvp(argv[3], argv+3);
Usage:
fprintf(stderr, "Usage: %s mach←type os←type command\n", argv[0]);
fprintf(stderr, "Currently mach←type = %s, os←type = %s\n",
MACH←TYPE, OS←TYPE);
return(1);
}