OSDN Git Service

fd7629fcc92541e181c686c8358c6c2c0552b44c
[portsreinstall/current.git] / lib / chroot / libusage.sh
1 #!/bin/sh -e
2 # ==============================================================================
3 # portsreinstall library script
4 # Overlay onto lib/libusage.sh for portsreinstall-chroot
5 # - Help messages -
6 # Copyright (C) 2018 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
7 # This software is distributed under the 2-Clause BSD License.
8 # ==============================================================================
9
10 # ============= Content of the short help =============
11 usage_short_content ()
12 {
13         cat << eof
14 USAGE: portsreinstall-chroot [OPTIONS] [--] [command]
15
16 [OPTIONS]
17  <Group 1: Just show messages and exit without operation>
18  -H : Show a long help whose content is the same as the manual page.
19  -h : Show this short help.
20  -V : Show the current version.
21  <Group 2: Effective anytime>
22  -a : Suppress messages to be batch-friendly.
23  -E delimiter(s) : Custom delimiter character(s) for -e option.
24  -J : Exit by doing nothing but just saving the options and command mode
25  -S : Suppress the credit, opening and terminating messages.
26  <Group 3: Saved and not renewable until cleaning>
27  -b : Base directory of the chroot environment (default: /home/.portsreinstall-chroot).
28  -c : Suppress cleaning the temporary database even if its obsolete.
29  -d : Forcibly invalidate the privilege of mounting/unmounting file systems.
30  -e dir[,dir2[,...]] : Extra directories to mount for the chroot environment.
31  -f : Full course mode.
32  -P : Import settings from pkgtools.conf(5) as the secondary if exists.
33  -p : Import settings from pkgtools.conf(5) as the primary if exists (default).
34  -Q : Ignore pkgtools.conf(5) even if it exists.
35  -s : Share the ports tree and package database with the host by nullfs
36
37 [ARGUMENTS]
38  command:
39             do (default) | auto [options] [arguments]
40           | enter
41           | mount | unmount
42           | sync
43           | destroy
44           | clean [normal] | clean force
45           | options
46  
47 [DESCRIPTIONS]
48  This utility assists to update packages by creating and using chroot environment for building. The chroot environment is first created by forking the host environment, and the user is asked to complete update of packages at the chroot environment.
49
50 [ROBUSTNESS AGAINST TERMINATION AND RESTART]
51  Execution of the commands except "clean" and "options" commands can be terminated at any points and restarted from there with the same options saved in the temporary database (independent among utilities). The saved options can be changed by the ways depending on the assigned groups of the options. The options and execution progress are reset to the default by "clean" command.
52 eof
53 }