r2pm: Add offline option for installation ##r2pm

This commit is contained in:
Sylvain Pelissier 2021-08-31 17:09:58 +02:00 committed by GitHub
parent 658239c1c6
commit bff04d1ac9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -225,6 +225,7 @@ upgradeOutdated() {
}
r2pm_update() {
[ "${R2PM_OFFLINE}" != 0 ] && return
[ -z "$R2PM_DBDIR" ] && R2PM_DBDIR="${R2PM_USRDIR}/db"
mkdir -p "${R2PM_GITDIR}"
mkdir -p "${HOME}/.config"

View File

@ -54,6 +54,10 @@ Install a test package (don't git pull on $R2PM_GITDIR/yara3)
.Pp
$ R2PM_GITSKIP=1 r2pm install yara3
.Pp
Avoid init/update calls (don't git pull on $R2PM_DBDIR)
.Pp
$ R2PM_OFFLINE=1 r2pm -i yara
.Pp
Uninstall a package
.Pp
$ r2pm uninstall yara3