2 # ==============================================================================
3 # portsreinstall library script
4 # - Interface of libraries for operations of commands as well as check of command line arguments -
5 # Copyright (C) 2018-2022 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
6 # This software is distributed under the 2-Clause BSD License.
7 # ==============================================================================
9 # ============= Variables =============
23 # ============= Check the necessity of opening notice =============
24 command_all_chk_need_opening_notice ()
29 # ============= Check the number of following command line arguments (in case glob arguments are needed) =============
30 _command_parse_args__chk_glob_args ()
34 [ $nargs -gt 0 ] && return
35 message_echo "ERROR: No port glob is specified." >&2
39 # ============= Check the number of following command line arguments (in case without arguments) =============
40 _command_parse_args__chk_no_arg ()
42 local nargs term_redundant_argument
44 [ $nargs -eq 0 ] && return
45 term_redundant_argument='A redundant argument is'
46 [ $nargs -gt 1 ] && term_redundant_argument='Redundant arguments are'
47 message_echo "ERROR: $term_redundant_argument specified." >&2
51 # ============= Execute command operations before getting the temporary database ready =============
52 command_all_exec_before_db_creation ()
56 # ============= Check and parse command line arguments =============
57 command_all_parse_args ()
61 # ============= Notify that option settings are reset =============
62 command_exec_without_pkgtools__notify_reset_options ()
64 [ $opt_no_opening_message = yes ] && return
65 message_echo "NOTE: Option settings are ignored (because of no effect) and reset."
68 # ============= Execute command operations which do not need package tools =============
69 command_all_exec_without_pkgtools ()
74 # ============= Notify that option settings are ignored because of no effect =============
75 _command_exec_irrespective_of_saved_options__notify_ignored_options ()
77 [ $opt_no_opening_message = yes ] && return
78 message_echo "NOTE: Option settings are ignored because they have no effect on this command."
81 # ============= Execute command operations which are irrespective of option settings =============
82 command_all_exec_irrespective_of_saved_options ()
86 # ============= Execute command operations which should be carried out just after completing the option settings =============
87 command_all_exec_just_after_option_settings ()
98 # ============= Execute command operations which should be done without upgrade of tools =============
99 command_all_exec_before_tools_upgrade ()
103 # ============= Execute command operations which must be done before the database construction =============
104 command_all_exec_command_specific_preconfiguration ()
108 # ============= Execute command operations of database construction =============
109 command_all_exec_build_database ()
113 # ============= Execute command operations which must be done before the main process =============
114 command_all_exec_before_main ()
118 # ============= Execute command operations as the main process =============
119 command_all_exec_main ()