summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Hyman <pete@peterhyman.com>2021-01-03 10:12:29 -0600
committerRobby Workman <rworkman@slackware.com>2021-01-04 23:08:49 -0600
commit23640d912ddf754934488a002070581fee2dbc77 (patch)
tree04020941cd64c01cc12663337a5e2111f854d23b
parentf62ecabf6c2a92ed7f689b7ac0eda52da4d094cc (diff)
downloadslackpkg-23640d912ddf754934488a002070581fee2dbc77.tar.xz
Add show-changelog option and update manpage
Signed-off-by: Robby Workman <rworkman@slackware.com>
-rw-r--r--files/core-functions.sh3
-rw-r--r--files/slackpkg11
-rw-r--r--files/slackpkg.87
3 files changed, 18 insertions, 3 deletions
diff --git a/files/core-functions.sh b/files/core-functions.sh
index c2891f5..f8be890 100644
--- a/files/core-functions.sh
+++ b/files/core-functions.sh
@@ -426,7 +426,7 @@ slackpkg - version $VERSION\n\
\tslackpkg [OPTIONS] info PACKAGE
\tslackpkg [OPTIONS] update [gpg]
\tslackpkg [OPTIONS] {clean-system|upgrade-all|install-new}
-\tslackpkg [OPTIONS] {new-config|check-updates|help}
+\tslackpkg [OPTIONS] {new-config|check-updates|show-changelog|help}
\nIf you need more information try to use 'slackpkg help' or look the\n\
slackpkg's manpage.
"
@@ -440,6 +440,7 @@ slackpkg - version $VERSION\n\
\t\t\t\t\tpackage indexes
\tslackpkg check-updates\t\tcheck if there is any news on
\t\t\t\t\tSlackware's ChangeLog.txt
+\tslackpkg show-changelog\t\tshow Slackware ChangeLog.txt and exit
\tslackpkg install package\tdownload and install packages
\tslackpkg upgrade package\tdownload and upgrade packages
\tslackpkg reinstall package\tsame as install, but for packages
diff --git a/files/slackpkg b/files/slackpkg
index f579ea3..b616a6a 100644
--- a/files/slackpkg
+++ b/files/slackpkg
@@ -246,7 +246,7 @@ while [ -n "$1" ] ; do
shift
fi
;;
- install-new|upgrade-all|clean-system|new-config|check-updates|help)
+ install-new|upgrade-all|clean-system|new-config|check-updates|show-changelog|help)
CMD=$1
shift
if [ -n "$1" ]; then
@@ -326,6 +326,15 @@ case "$CMD" in
echo "Slackpkg: Updated packages are available since last check." >&2
fi
;;
+ show-changelog)
+ # display changelog and exit
+ if [ -e ${ROOT}/${WORKDIR}/ChangeLog.txt ]; then
+ $MORECMD ${ROOT}/${WORKDIR}/ChangeLog.txt
+ else
+ echo "ChangeLog.txt file not found. Aborting"
+ fi
+ POSTINST=off
+ ;;
update)
# If you are using "slackpkg update gpg" OR the system
# doesn't have Slackware GPG key, download and install
diff --git a/files/slackpkg.8 b/files/slackpkg.8
index 02da92f..2f628b9 100644
--- a/files/slackpkg.8
+++ b/files/slackpkg.8
@@ -26,7 +26,7 @@
.B slackpkg [OPTIONS] update [gpg]
-.B slackpkg [OPTIONS] {new-config|check-updates}
+.B slackpkg [OPTIONS] {new-config|check-updates|show-changelog}
.B slackpkg [OPTIONS] help
@@ -154,6 +154,11 @@ Verify if there is any update to ChangeLog.txt. This is good to be used from
cron to alert the sysadmin about updates.
.TP 5
+.B show-changelog
+.br
+Display Slackware ChangeLog.txt file and exit.
+
+.TP 5
.B file-search
.br
You can search the official Slackware packages for any file in the Slackware