diff options
author | alm <alm@FreeBSD.org> | 1994-05-19 18:27:41 +0000 |
---|---|---|
committer | alm <alm@FreeBSD.org> | 1994-05-19 18:27:41 +0000 |
commit | 10d0bd53ff94d2136af2629b2cb33583e277d09e (patch) | |
tree | 57f6845b8e0519128a1d762370dc26d10f7f223c /usr.sbin | |
parent | 459ed7e4316bf44797e4098d54efd58a0803b3b6 (diff) | |
download | FreeBSD-src-10d0bd53ff94d2136af2629b2cb33583e277d09e.zip FreeBSD-src-10d0bd53ff94d2136af2629b2cb33583e277d09e.tar.gz |
Add `-h' option to force tar to follow symbolic links
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_install/create/create.h | 3 | ||||
-rw-r--r-- | usr.sbin/pkg_install/create/main.c | 7 | ||||
-rw-r--r-- | usr.sbin/pkg_install/create/perform.c | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_install/create/pkg_create.1 | 4 |
4 files changed, 15 insertions, 3 deletions
diff --git a/usr.sbin/pkg_install/create/create.h b/usr.sbin/pkg_install/create/create.h index 2f683ce..d45c177 100644 --- a/usr.sbin/pkg_install/create/create.h +++ b/usr.sbin/pkg_install/create/create.h @@ -1,4 +1,4 @@ -/* $Id: create.h,v 1.4 1993/09/04 05:06:32 jkh Exp $ */ +/* $Id: create.h,v 1.4 1993/09/12 20:45:28 jkh Exp $ */ /* * FreeBSD install - a package for the installation and maintainance @@ -32,6 +32,7 @@ extern char *Contents; extern char *Require; extern char *PlayPen; extern char *ExcludeFrom; +extern int Dereference; void check_list(char *, Package *); void usage(const char *, const char *, ...); diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c index f05b9da..e7805ca 100644 --- a/usr.sbin/pkg_install/create/main.c +++ b/usr.sbin/pkg_install/create/main.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: main.c,v 1.5 1994/04/05 14:05:38 jkh Exp $"; +static const char *rcsid = "$Id: main.c,v 1.6 1994/04/16 21:50:53 jkh Exp $"; #endif /* @@ -27,6 +27,7 @@ char *Contents = NULL; char *Require = NULL; char *PlayPen = NULL; char *ExcludeFrom = NULL; +int Dereference = 0; int main(int argc, char **argv) @@ -87,6 +88,9 @@ main(int argc, char **argv) break; case 'h': + Dereference = 1; + break; + case '?': default: usage(prog_name, NULL); @@ -134,6 +138,7 @@ usage(const char *name, const char *fmt, ...) fprintf(stderr, "-c [-]file Get one-line comment from file (-or arg)\n"); fprintf(stderr, "-d [-]file Get description from file (-or arg)\n"); fprintf(stderr, "-f file get list of files from file (- for stdin)\n"); + fprintf(stderr, "-h follow symbolic links\n"); fprintf(stderr, "-i script install script\n"); fprintf(stderr, "-p arg install prefix will be arg\n"); fprintf(stderr, "-k script de-install script\n"); diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index 2363a38..7eb9ff3 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: perform.c,v 1.6 1993/09/12 20:56:40 jkh Exp $"; +static const char *rcsid = "$Id: perform.c,v 1.7 1993/09/18 03:39:20 jkh Exp $"; #endif /* @@ -145,6 +145,8 @@ make_dist(char *home, char *pkg, char *suffix, Package *plist) sprintf(tball, "%s/%s.%s", home, pkg, suffix); if (index(suffix, 'z')) /* Compress/gzip? */ strcat(args, "z"); + if (Dereference) + strcat(args, "h"); if (Verbose) printf("Creating gzip'd tar ball in '%s'\n", tball); strcat(args, "cf"); diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1 index 3d29b52..67df84d 100644 --- a/usr.sbin/pkg_install/create/pkg_create.1 +++ b/usr.sbin/pkg_install/create/pkg_create.1 @@ -83,6 +83,10 @@ is a (dash). .B "Mandatory." .TP +.B -h +Forces tar to follow symbolic links, so that the files they point to +are dumped, rather than the links themselves. +.TP .BI "\-i\ " script Sets .I script |