add pkgup helper extension

This commit is contained in:
Aaron Bieber 2020-08-24 22:20:38 +00:00
parent c922fb9f71
commit e5a6aeb185
2 changed files with 23 additions and 0 deletions

14
extensions/pkgup.ksh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/ksh
pkgup() {
local _up_url
_up_url="https://pintobyte.com/pkgup/"
[ ! -z $1 ] && _up_url=$1
if which obsdpkgup >/dev/null 2>&1; then
PKGUP_URL="$_up_url" obsdpkgup
else
echo "Please install obsdpkgup:"
echo " GO111MODULE=on go get -u github.com/neutralinsomniac/obsdpkgup"
fi
}

9
extensions/pkgup.org Normal file
View File

@ -0,0 +1,9 @@
* pkgup
~pkgup~ uses [[https://github.com/neutralinsomniac/obsdpkgup][obsdpkgup]] to provide [[https://man.openbsd.org/pkg_add][pkg_add]] a shortened list of packages that need
updating. For more information on how this works, see `obsdpkgup`'s
[[https://github.com/neutralinsomniac/obsdpkgup#rationale][documentation]].
| Function | Description |
|----------+-------------------------------------------------------------------------|
| ~pkgup~ | Convenience function intended to have its result piped to ~pkg_add(1)~. |