aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1993-09-18 03:39:21 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1993-09-18 03:39:21 +0000
commitd4473b1c598525d8455312cc75a7ed5fff9310d6 (patch)
tree6516b4bd2a657e979753a37c3f4d8a0eb968f73c /usr.sbin/pkg_install
parentec9753736937d190a62df0c6564838ebb11a6433 (diff)
downloadsrc-d4473b1c598525d8455312cc75a7ed5fff9310d6.tar.gz
src-d4473b1c598525d8455312cc75a7ed5fff9310d6.zip
Doc new % sequence expansion for command execution.
Fixed bad verbose message.
Notes
Notes: svn path=/head/; revision=478
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/create/perform.c4
-rw-r--r--usr.sbin/pkg_install/create/pkg_create.155
2 files changed, 52 insertions, 7 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index 8b0f73be3f50..2363a385aafc 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.5 1993/09/04 05:06:33 jkh Exp $";
+static const char *rcsid = "$Id: perform.c,v 1.6 1993/09/12 20:56:40 jkh Exp $";
#endif
/*
@@ -146,7 +146,7 @@ make_dist(char *home, char *pkg, char *suffix, Package *plist)
if (index(suffix, 'z')) /* Compress/gzip? */
strcat(args, "z");
if (Verbose)
- printf("Creating gzip'd tar ball in '%s', contents:\n", tball);
+ printf("Creating gzip'd tar ball in '%s'\n", tball);
strcat(args, "cf");
if (ExcludeFrom)
ret = vsystem("tar %sX %s %s .", args, tball, ExcludeFrom);
diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1
index b4cb2853f8eb..34a548b44ff9 100644
--- a/usr.sbin/pkg_install/create/pkg_create.1
+++ b/usr.sbin/pkg_install/create/pkg_create.1
@@ -157,11 +157,56 @@ Execute
.I command
as part of the unpacking process. If
.I command
-contains a `%s/%s' sequence somewhere in it, it will be expanded to
-the name of the current directory and last filename extracted. In
-practice, such weird things should be unnecessary in all but the most
-extenuating circumstances, but it's there should you need it
-nonetheless.
+contains a any of the following sequences somewhere in it, they will
+be expanded inline. For the following examples, assume that
+.B @cwd
+is set to
+.B /usr/local
+and the last extracted file was
+.B bin/emacs.
+.TP
+.I "%F"
+Expands to the last filename extracted (as specified), in the example case
+.B bin/emacs
+.TP
+.I "%D"
+Expands to the current directory prefix, as set with
+.B @cwd,
+in the example case
+.B /usr/local.
+.TP
+.I "%B"
+Expands to the "basename" of the fully qualified filename, that
+is the current directory prefix, plus the last filespec, minus
+the trailing filename. In the example case, that would be
+.B /usr/local/bin.
+.TP
+.I "%f"
+Expands to the "filename" part of the fully qualified name, or
+the converse of
+.B %B
+, being in the example case,
+.B emacs.
+.TP
+.BI "@unexec\ " command
+Execute
+.I command
+as part of the deinstallation process. Expansion of special
+.B %
+sequences is the same as for
+.B @exec.
+This command is not executed during the package add, as
+.B @exec
+is, but rather when the package is deleted. This is useful
+for creating links and other ancillary files that were created
+as a result of adding the package, but not directly known to
+the package's table of contents (and hence not automatically
+removable). The advantage of using
+.B @unexec
+over a deinstallation script is that you can use the "special
+sequence expansion" to get at files regardless of where they've
+been potentially redirected (see
+.B -p)
.TP
.BI "@mode\ " mode
Sets default permission for all subsequently extracted files to