Skip to content

Commit

Permalink
bash: man: Remove .sh extension
Browse files Browse the repository at this point in the history
Executables in $PATH should not have an extension. This allows for a
re-write in a different language.

Signed-off-by: Mark Grant <[email protected]>
  • Loading branch information
m-grant-prg committed Oct 9, 2023
1 parent fb67488 commit 6d31309
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 34 deletions.
16 changes: 9 additions & 7 deletions src/man/8/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#########################################################################
# #
# Script ID: src/man/8/Makefile.am #
# Author: Copyright (C) 2014-2021 Mark Grant #
# Author: Copyright (C) 2014-2021, 2023 Mark Grant #
# #
# Released under the GPLv3 only. #
# SPDX-License-Identifier: GPL-3.0-only #
Expand Down Expand Up @@ -36,11 +36,13 @@
# 22/05/2020 MG 1.0.9 Rename script to have .sh extension. #
# Add apt-key-scripts.sh man page. #
# 22/11/2021 MG 1.0.10 Tighten SPDX tag. #
# 09/10/2023 MG 1.0.11 Drop .sh extension for scripts in #
# $PATH. #
# #
#########################################################################


agmaint.sh.8 apt-key-scripts.sh.8: Makefile
agmaint.8 apt-key-scripts.8: Makefile
mkdir -p $(@D)
rm -f $@ $@.tmp
$(edit) $(srcdir)/$(@F).man.in > $@.tmp
Expand All @@ -59,13 +61,13 @@ agmaint.sh.8 apt-key-scripts.sh.8: Makefile
txt2manwrap $(@F) $$section "agmaint Manual" $@.tmp $@
rm -f $@.tmp

agmaint.sh.8: $(srcdir)/agmaint.sh.8.man.in
apt-key-scripts.sh.8: $(srcdir)/apt-key-scripts.sh.8.man.in
agmaint.8: $(srcdir)/agmaint.8.man.in
apt-key-scripts.8: $(srcdir)/apt-key-scripts.8.man.in

man_MANS = agmaint.sh.8 apt-key-scripts.sh.8
man_MANS = agmaint.8 apt-key-scripts.8

EXTRA_DIST = $(srcdir)/agmaint.sh.8.man.in $(srcdir)/apt-key-scripts.sh.8.man.in
EXTRA_DIST = $(srcdir)/agmaint.8.man.in $(srcdir)/apt-key-scripts.8.man.in


CLEANFILES = *.tmp agmaint.sh.8 apt-key-scripts.sh.8
CLEANFILES = *.tmp agmaint.8 apt-key-scripts.8

8 changes: 4 additions & 4 deletions src/man/8/agmaint.sh.8.man.in → src/man/8/agmaint.8.man.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
NAME
agmaint.sh - agmaint script
agmaint - agmaint script
SYNOPSIS
agmaint.sh [OPTION]
agmaint [OPTION]
DESCRIPTION
A script to automate running of daily apt-get maintenance commands.

Any arguments after a -- will get passed straight to the apt-get commands. This
is useful for automatically assuming yes. e.g.
.br
agmaint.sh -- -y
agmaint -- -y
OPTIONS
-h, --help prints usage information

Expand All @@ -24,7 +24,7 @@ Written by Mark Grant.
REPORTING BUGS
Report bugs to <[email protected]>
COPYRIGHT
Copyright (C) 2014-2017, 2019-2021 Mark Grant.
Copyright (C) 2014-2017, 2019-2021, 2023 Mark Grant.
.br
License GPLv3: GNU GPL version 3 only
.br
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
NAME
apt-key-scripts.sh - A script to manage scripts to retrieve APT keys and store
apt-key-scripts - A script to manage scripts to retrieve APT keys and store
them in APT keyrings.
SYNOPSIS
apt-key-scripts.sh [OPTION]
apt-key-scripts [OPTION]
DESCRIPTION
This is a helper script to simplify management of apt keys. The process is
envisaged to go something like this:-
Expand All @@ -20,12 +20,12 @@ curl -fsSL"$verbose" http://hermes.mgent.home/aptrepos/hermes.gpg \

2 ... Install the script by
.RS
apt-key-scripts.sh --install 'script_name'
apt-key-scripts --install 'script_name'
.RE

3 ... Run the script by
.RS
apt-key-scripts.sh --exec 'script_name'
apt-key-scripts --exec 'script_name'
.RE
OPTIONS
-a or --exec-all Execute all the available scripts
Expand Down Expand Up @@ -57,10 +57,10 @@ BUGS
Report bugs to <[email protected]>
EXAMPLES
Example scripts can be found in @pkgdatadir@/trusted.sh.d
AUTHOR
UTHOR
Written by Mark Grant.
COPYRIGHT
Copyright (C) 2020-2022 Mark Grant.
Copyright (C) 2020-2023 Mark Grant.
.br
License GPLv3: GNU GPL version 3 only
.br
Expand Down
16 changes: 9 additions & 7 deletions src/prg/bash/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#########################################################################
# #
# Script ID: src/prg/bash/Makefile.am #
# Author: Copyright (C) 2014-2021 Mark Grant #
# Author: Copyright (C) 2014-2021, 2023 Mark Grant #
# #
# Released under the GPLv3 only. #
# SPDX-License-Identifier: GPL-3.0-only #
Expand Down Expand Up @@ -32,23 +32,25 @@
# 21/05/2020 MG 1.0.9 Change script extension .sh #
# Add apt-key-scripts.sh #
# 22/11/2021 MG 1.0.10 Tighten SPDX tag. #
# 09/10/2023 MG 1.0.11 Drop .sh extension for scripts in #
# $PATH. #
# #
#########################################################################


agmaint.sh apt-key-scripts.sh: Makefile
agmaint apt-key-scripts: Makefile
mkdir -p $(@D)
rm -f $@ $@.tmp
test -f ./$@.sh.in || srcdir=$(srcdir)/; \
$(edit) $${srcdir}$(@F).in > $@.tmp
$(edit) $${srcdir}$(@F).sh.in > $@.tmp
mv $@.tmp $@
chmod a+x $@
agmaint.sh: $(srcdir)/agmaint.sh.in
apt-key-scripts.sh: $(srcdir)/apt-key-scripts.sh.in
agmaint: $(srcdir)/agmaint.sh.in
apt-key-scripts: $(srcdir)/apt-key-scripts.sh.in

sbin_SCRIPTS = agmaint.sh apt-key-scripts.sh
sbin_SCRIPTS = agmaint apt-key-scripts

EXTRA_DIST = $(srcdir)/agmaint.sh.in $(srcdir)/apt-key-scripts.sh.in

CLEANFILES = *.tmp agmaint.sh apt-key-scripts.sh
CLEANFILES = *.tmp agmaint apt-key-scripts

12 changes: 7 additions & 5 deletions src/prg/bash/agmaint.sh.in
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#! @bashlocation@
#########################################################################
# #
# agmaint.sh is automatically generated, #
# agmaint is automatically generated, #
# please do not modify! #
# #
#########################################################################

#########################################################################
# #
# Script ID: agmaint.sh #
# Author: Copyright (C) 2014-2017, 2019-2021 Mark Grant #
# Script ID: agmaint #
# Author: Copyright (C) 2014-2017, 2019-2021, 2023 Mark Grant #
# #
# Released under the GPLv3 only. #
# SPDX-License-Identifier: GPL-3.0-only #
# #
# Purpose: #
# To simplify the running of daily apt-get maintenance commands. #
# #
# Syntax: agmaint.sh [ -h || --help ] || [ -V || --version ] #
# Syntax: agmaint [ -h || --help ] || [ -V || --version ] #
# #
# Exit codes used:- #
# Bash standard Exit Codes: 0 - success #
Expand Down Expand Up @@ -81,14 +81,16 @@
# 03/06/2020 MG 1.1.2 Pass CLA's after a -- straight to the #
# apt-get commands. #
# 22/11/2021 MG 1.1.3 Tighten SPDX tag. #
# 09/10/2023 MG 1.1.4 Drop .sh extension from scripts in #
# $PATH. #
# #
#########################################################################


##################
# Init variables #
##################
readonly version=1.1.3 # Script version
readonly version=1.1.4 # Script version
readonly outputprefix="$(basename $0): "
readonly packageversion=@pkgversion@ # Package version

Expand Down
12 changes: 7 additions & 5 deletions src/prg/bash/apt-key-scripts.sh.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#! @bashlocation@
#########################################################################
# #
# apt-key-scripts.sh is automatically generated, #
# apt-key-scripts is automatically generated, #
# please do not modify! #
# #
#########################################################################

#########################################################################
# #
# Script ID: apt-key-scripts.sh #
# Author: Copyright (C) 2020, 2021 Mark Grant #
# Script ID: apt-key-scripts #
# Author: Copyright (C) 2020, 2021, 2023 Mark Grant #
# #
# Released under the GPLv3 only. #
# SPDX-License-Identifier: GPL-3.0-only #
Expand All @@ -18,7 +18,7 @@
# To manage and execute scripts for maintaining apt trusted keys and #
# keyrings. #
# #
# Syntax: apt-key-scripts.sh [ -a || --exec-all ] || #
# Syntax: apt-key-scripts [ -a || --exec-all ] || #
# [ -c || --cat ] || #
# [ -e || --exec ] || #
# [ -h || --help ] || #
Expand Down Expand Up @@ -67,14 +67,16 @@
# 14/06/2020 MG 1.0.2 Ensure functions called by others #
# appear first. #
# 22/11/2021 MG 1.0.3 Tighten SPDX tag. #
# 09/10/2023 MG 1.0.4 Drop .sh extension from scripts in #
# $PATH. #
# #
#########################################################################


##################
# Init variables #
##################
readonly version=1.0.3 # Script version
readonly version=1.0.4 # Script version
readonly outputprefix="$(basename $0): "
readonly packageversion=@pkgversion@ # Package version

Expand Down

0 comments on commit 6d31309

Please sign in to comment.