summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1993-09-18 03:39:21 +0000
committerjkh <jkh@FreeBSD.org>1993-09-18 03:39:21 +0000
commitc8b21d348caf8859889cddf47bfacd774107faac (patch)
tree6516b4bd2a657e979753a37c3f4d8a0eb968f73c /usr.sbin/pkg_install
parent1bb96bf0e126b01b7f62c92ead98c66458dc442a (diff)
downloadFreeBSD-src-c8b21d348caf8859889cddf47bfacd774107faac.zip
FreeBSD-src-c8b21d348caf8859889cddf47bfacd774107faac.tar.gz
Doc new % sequence expansion for command execution.
Fixed bad verbose message.
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 8b0f73b..2363a38 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 b4cb285..34a548b 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
OpenPOWER on IntegriCloud