Skip to content

Commit

Permalink
Merge branch 'm-1' into 'master'
Browse files Browse the repository at this point in the history
fix date and version in the manual page

See merge request sc0ttj/Pkg!27
  • Loading branch information
Scott J committed Jan 12, 2020
2 parents 737a215 + 2a65850 commit c214146
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions installer.sh
Expand Up @@ -26,6 +26,13 @@ do
[ -f $existing_file ] && mv $existing_file /root/.pkg/
done

# fix version and date in man page - get version from recently installed
VER=$(while read ver; do [ "${ver:0:6}" = 'APPVER' ] && ver=${ver#*=} && ver=${ver/\"/} && ver=${ver/\"/} && echo $ver && break;done < /usr/sbin/pkg)
DATE="$(date '+%B %Y')"
sed -e "s/VERSION_PLACEHOLDER/$VER/g" \
-e "s/DATE_PLACEHOLDER/$DATE/" \
< usr/share/man/man1/pkg.1 > /usr/share/man/man1/pkg.1

[ -s ~/.packages/${pkgname}.files ] && echo -e "Package contents listed in ~/.packages/${pkgname}.files \n"

echo -e "Setting up Pkg... \n"
Expand Down
4 changes: 2 additions & 2 deletions usr/share/man/man1/pkg.1
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
.TH PKG "1" "December 2017" "Pkg 1.9.19alpha" "User Commands"
.TH PKG "1" "DATE_PLACEHOLDER" "Pkg VERSION_PLACEHOLDER" "User Commands"
.SH NAME
Pkg
.SH VERSION
1.9.17alpha
VERSION_PLACEHOLDER
.SH SYNOPSIS
.B pkg
[OPTION(S)] PKGNAME|FILENAME|SEARCH
Expand Down

0 comments on commit c214146

Please sign in to comment.