freebsd-ports/games/wolfpack/files/patch-ad
Chris D. Faulhaber 3263364474 Update port to 4.2.8
PR:		23605
Submitted by:	Maintainer
2000-12-19 01:17:36 +00:00

46 lines
1 KiB
Text

--- src/doconfig/doconfig.c.orig Sat Dec 16 18:08:03 2000
+++ src/doconfig/doconfig.c Sat Dec 16 18:49:52 2000
@@ -90,12 +90,18 @@
#endif
int
-main()
+main(int argc, char **argv)
{
char buf[256];
char *cp;
char *pathname;
+ if (argc != 2) {
+ printf("Bad usage");
+ exit(-1);
+ }
+
+
if ((pathname = getcwd(NULL, 255)) == NULL) {
printf("Can't get current path!\n");
exit(-1);
@@ -112,13 +118,15 @@
cp = (char *)rindex(pathname, '\\');
*cp = '\0';
#endif
+ if (!strcasecmp(argv[1], "config")) {
printf("Configuring...\n");
wrmakesrc(pathname);
sprintf(buf, "%s/include/gamesdef.h", pathname);
wrgamesdef(buf);
sprintf(buf, "%s/src/client/ipglob.c", pathname);
wripglob(buf);
-
+ } else {
+ printf("Installing...\n");
if (access(EP, 0)) {
printf("making directory %s\n", EP);
if (mkdir(EP, 493)) {
@@ -136,6 +144,7 @@
}
sprintf(buf, "%s/data/auth", EP);
wrauth(buf);
+ }
exit(0);
}