OSDN Git Service

[NEW] Option -f is added.
[portsreinstall/current.git] / lib / libusage.sh
1 #!/bin/sh -e
2 # ==============================================================================
3 # portsreinstall library script
4 # - Help messages -
5 # Copyright (C) 2013-2016 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
6 # This software is distributed under the 2-Clause BSD License.
7 # ==============================================================================
8
9 # ============= Output a short help =============
10 usage_short ()
11 {
12         fold -s -w `misc_get_console_column_size` << eof
13 USAGE: ${APPNAME} [OPTIONS] [--] [command]
14
15 [OPTIONS]
16  <Group 1: Just show messages and exit without operation>
17  -H : Show a long help whose content is the same as the manual page.
18  -h : Show this short help.
19  -V : Show the current version.
20  <Group 2: Effective anytime>
21  -a : Suppress messages to be batch-friendly.
22  -f : Force continuation for looped dependency
23  -i : Include new targets to the "needed" list.
24  -M : Reset group 4 option settings.
25  <Group 3: Effective only with redo command>
26  -L : Reload configuration files and reset group 6 option settings.
27  -N : Reset group 5 option settings.
28  <Group 4: Saved and transferred to restarted runs, renewable by -M option>
29  -A : Only non-interactive ports are (re)installed.
30  -B : Exclude run-time dependencies in evaluation of dependencies.
31  -b : Include build-time dependencies in evaluation of dependencies.
32  -C : Skip "make config" by applying default port options if unconfigured.
33  -c : Suppress cleaning the temporary database even if its obsolete.
34  -D : Suppress entire inspection of distinfo in the ports tree.
35  -d : Do not clean up obsolete or unused distfiles.
36  -G : Use prebuilt packages for ports with the default configurations.
37  -g : Keep pkg(8) and dialog4ports(1) untouched.
38  -I : Only interactive ports are (re)installed.
39  -k : Keep ${APPNAME} itself untouched.
40  -l : Use legacy packages when prebuilt pkgng packages are missing.
41  -n : No operation is carried out (just for seeing what will be done).
42  -q : Only new ports and their run-time requirements are reinstalled.
43  -s : Build of vulnerable ports are avoided by triggering errors.
44  -X : Deselect all deinstallation candidates.
45  -Y : Select all deinstallation candidates.
46  <Group 5: Saved and transferred to restarted runs, renewable by -N option>
47  -O glob1[:glob2[:...]] : Reinstall only target ports themselves.
48  -o : Ignore ports which are outside of target scopes of -O, -T or -t options.
49  -T glob1[:glob2[:...]] : Reinstall only target ports and their requirements.
50  -t glob1[:glob2[:...]] : Reinstall only target ports and their dependents.
51  <Group 6: Saved and transferred to restarted runs, renewable by -L option>
52  -P : Import settings from pkgtools.conf(5) as the secondary if exists.
53  -p : Import settings from pkgtools.conf(5) as the primary if exists (default).
54  -Q : Ignore pkgtools.conf(5) even if it exists.
55
56  *NOTE*
57  The configuration of options annotated as "saved and transferred to restarted runs" are saved in the temporary database by the first run after cleaning the database. In the following runs, the corresponding option settings are loaded from the saved configuration if executed with no option or exactly the same option set as the saved one. Otherwise, the option settings are renewed for possible ones and the others are loaded from the saved configuration. Then the saved configuration is updated with the renewed settings.
58
59 [ARGUMENTS]
60  command: do [all] (default) | [do] prepare | redo [all] | redo prepare
61           | clean [normal] | clean force | reset [all] | reset keepopts
62           | ok add globs... | ok del globs...
63           | taboo add globs... | taboo del globs...
64           | need add globs... | need del globs...
65           | noneed add globs... | noneed del globs...
66           | reselect leaves | reselect obsolete
67           | save [dir] | load path | glob globs... | options
68           | rmconf globs... | reconf globs... | forget globs...
69           | escape globs... | restore globs...
70           | pkgsanity [globs...]
71           | show todo | show done | show resolved | show failure | show redo
72           | show taboo | show need | show noneed | show restored | show deleted
73           | show conflict | show requirements glob... | show dependents glob...
74           | show initrequirements glob... | show initdependents glob...
75           | show status glob...
76
77 [DESCRIPTIONS]
78  This utility is an alternative to portupgrade(1) and portmaster(8), and designed to be suitable for reinstallation of all packages after major version upgrade of the system or very long absence of ports upgrade.
79  Usually, you can execute with no option nor argument. If portupgrade(1) is installed, compatibility with it is taken into account by importing pkgtools.conf(5) and rebuilding the package database.
80 eof
81 }
82
83 # ============= Output a long help =============
84 usage_long ()
85 {
86         zcat "`whereis -qm \"${APPNAME}\"`" | nroff -man
87 }