Add show-changelog option and update manpage

Signed-off-by: Robby Workman <rworkman@slackware.com>
This commit is contained in:
Peter Hyman 2021-01-03 10:12:29 -06:00 committed by Robby Workman
parent f62ecabf6c
commit 23640d912d
3 changed files with 18 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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
@ -153,6 +153,11 @@ once and forget it...
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