main.c (201226) | main.c (207113) |
---|---|
1/* 2 * 3 * FreeBSD install - a package for the installation and maintainance 4 * of non-core utilities. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 5 unchanged lines hidden (view full) --- 14 * 15 * Jordan K. Hubbard 16 * 18 July 1993 17 * 18 * This is the add module. 19 */ 20 21#include <sys/cdefs.h> | 1/* 2 * 3 * FreeBSD install - a package for the installation and maintainance 4 * of non-core utilities. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 5 unchanged lines hidden (view full) --- 14 * 15 * Jordan K. Hubbard 16 * 18 July 1993 17 * 18 * This is the add module. 19 */ 20 21#include <sys/cdefs.h> |
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/add/main.c 201226 2009-12-29 22:33:53Z ed $"); | 22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/add/main.c 207113 2010-04-23 11:07:43Z flz $"); |
23 24#include <sys/param.h> 25#include <sys/utsname.h> 26#include <err.h> 27#include <getopt.h> 28 | 23 24#include <sys/param.h> 25#include <sys/utsname.h> 26#include <err.h> 27#include <getopt.h> 28 |
29#include "lib.h" | 29#include <pkg.h> |
30#include "add.h" 31 32char *Prefix = NULL; 33Boolean PrefixRecursive = FALSE; 34char *Chroot = NULL; 35Boolean NoInstall = FALSE; 36Boolean NoRecord = FALSE; 37Boolean Remote = FALSE; --- 85 unchanged lines hidden (view full) --- 123main(int argc, char **argv) 124{ 125 int ch, error; 126 char **start; 127 char *cp, *packagesite = NULL, *remotepkg = NULL, *ptr; 128 static char temppackageroot[MAXPATHLEN]; 129 static char pkgaddpath[MAXPATHLEN]; 130 | 30#include "add.h" 31 32char *Prefix = NULL; 33Boolean PrefixRecursive = FALSE; 34char *Chroot = NULL; 35Boolean NoInstall = FALSE; 36Boolean NoRecord = FALSE; 37Boolean Remote = FALSE; --- 85 unchanged lines hidden (view full) --- 123main(int argc, char **argv) 124{ 125 int ch, error; 126 char **start; 127 char *cp, *packagesite = NULL, *remotepkg = NULL, *ptr; 128 static char temppackageroot[MAXPATHLEN]; 129 static char pkgaddpath[MAXPATHLEN]; 130 |
131 pkg_wrap(PKG_INSTALL_VERSION, argv); 132 |
|
131 if (*argv[0] != '/' && strchr(argv[0], '/') != NULL) 132 PkgAddCmd = realpath(argv[0], pkgaddpath); 133 else 134 PkgAddCmd = argv[0]; 135 136 start = argv; 137 while ((ch = getopt_long(argc, argv, opts, longopts, NULL)) != -1) { 138 switch(ch) { --- 215 unchanged lines hidden --- | 133 if (*argv[0] != '/' && strchr(argv[0], '/') != NULL) 134 PkgAddCmd = realpath(argv[0], pkgaddpath); 135 else 136 PkgAddCmd = argv[0]; 137 138 start = argv; 139 while ((ch = getopt_long(argc, argv, opts, longopts, NULL)) != -1) { 140 switch(ch) { --- 215 unchanged lines hidden --- |