1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Support Alpha and -CURRENT in the "-r" option case.

This commit is contained in:
David E. O'Brien 1999-06-14 21:58:59 +00:00
parent 501bebb5be
commit ba83352b78
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47916

View File

@ -1,6 +1,6 @@
#ifndef lint
static const char rcsid[] =
"$Id: main.c,v 1.22 1999/01/26 22:31:23 billf Exp $";
"$Id: main.c,v 1.23 1999/01/28 20:17:32 billf Exp $";
#endif
/*
@ -26,6 +26,7 @@ static const char rcsid[] =
#include <err.h>
#include <sys/param.h>
#include <sys/utsname.h>
#include <objformat.h>
#include "lib.h"
#include "add.h"
@ -187,18 +188,25 @@ static char *
getpackagesite(char binform[1024])
{
int reldate;
static char sitepath[MAXPATHLEN];
struct utsname u;
reldate = getosreldate();
if (reldate == 300005)
return "i386/packages-3.0/";
else if (300004 > reldate && reldate >= 300000)
return "i386/packages-3.0-aout/Latest/" ;
else if (300004 < reldate)
return !strcmp(binform, "elf") ? "i386/packages-3-stable/Latest/" :
"i386/packages-3.0-aout/Latest/";
uname(&u);
strcpy(sitepath, u.machine);
return("");
if (reldate == 300005)
strcat(sitepath, "/packages-3.0/");
else if (300000 < reldate && reldate <= 300004)
strcat(sitepath, "/packages-3.0-aout/Latest/");
else if (300004 < reldate && reldate < 400000)
strcat(sitepath, !strcmp(binform, "elf") ? "/packages-3-stable/Latest/" :
"/packages-3.0-aout/Latest/");
else
strcat(sitepath, "/packages-current/Latest/");
return sitepath;
}