3 #==============================================================================
5 # File ID: bbc53b64-0648-11ee-88e1-83850402c3ce
10 # ©opyleft 2023– Øyvind A. Holm <sunny@sunbase.org>
11 # License: GNU General Public License version 2 or later, see end of file for
13 #==============================================================================
31 $progname =~ s/^.*\/(.*?)$/$1/;
32 our $VERSION = '0.0.0';
34 Getopt
::Long
::Configure
('bundling');
37 'help|h' => \
$Opt{'help'},
38 'quiet|q+' => \
$Opt{'quiet'},
39 'verbose|v+' => \
$Opt{'verbose'},
40 'version' => \
$Opt{'version'},
42 ) || die("$progname: Option error. Use -h for help.\n");
44 $Opt{'verbose'} -= $Opt{'quiet'};
45 $Opt{'help'} && usage
(0);
46 if ($Opt{'version'}) {
63 s/^( +)/tograve($1)/ge;
79 # Print program version
80 print("$progname $VERSION\n");
85 # Send the help message to stdout
88 if ($Opt{'verbose'}) {
94 Usage: $progname [options] [file [files [...]]]
101 Be more quiet. Can be repeated to increase silence.
103 Increase level of verbosity. Can be repeated.
105 Print version information.
112 # Print a status message to stderr based on verbosity level
113 my ($verbose_level, $Txt) = @_;
115 $verbose_level > $Opt{'verbose'} && return;
116 print(STDERR
"$progname: $Txt\n");
122 # This program is free software; you can redistribute it and/or modify it under
123 # the terms of the GNU General Public License as published by the Free Software
124 # Foundation; either version 2 of the License, or (at your option) any later
127 # This program is distributed in the hope that it will be useful, but WITHOUT
128 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
129 # FOR A PARTICULAR PURPOSE.
130 # See the GNU General Public License for more details.
132 # You should have received a copy of the GNU General Public License along with
134 # If not, see L<http://www.gnu.org/licenses/>.
136 # vim: set ts=8 sw=8 sts=8 noet fo+=w tw=79 fenc=UTF-8 :