This repository has been archived by the owner. It is now read-only.
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (22 sloc) 741 Bytes
set -e
. rpg-sh-setup
USAGE '${PROGNAME} [-u] [<package>...]
Upgrade packages to the latest available version. With no <package>, upgrade
all outdated packages.
-u Sync the remote package index to be sure the latest version
is available.'
# Update the package index. Force the update right now with the `-u`
# arg; otherwise, maybe update it based on the configured stale time.
if test "$1" = '-u'
then rpg-sync
else rpg-sync -s
# Have `rpg-list` generate a list of all installed package with parseable
# output. Grab only outdated packages and pass them all to `rpg-install`.
rpg-list -p "$@" |
awk '/^o / { print $2, $4 }' |
xargs rpg-install