6 changed files with 49 additions and 8 deletions
@ -0,0 +1,18 @@ |
|||
#' Install a package from a SourceHut git repository |
|||
#' |
|||
#' Works like [remotes::install_gitlab()], [remotes::install_bitbucket()], [remotes::install_github()] (etc). |
|||
#' You can also omit the leading tilde ("~") from the username portion of the repository address |
|||
#' |
|||
#' @param repo Repository address in the format `username/repo`. You can specify `subdir` and/or `ref` using the |
|||
#' respective parameters (via `...`). |
|||
#' @param ... passed on to [remotes::install_git()] |
|||
#' @export |
|||
install_sourcehut <- function(repo, ...) { |
|||
|
|||
repo <- repo[1] |
|||
|
|||
if (!startsWith(repo, "~")) repo <- glue::glue("~{repo}") |
|||
|
|||
remotes::install_git(url = glue::glue("https://git.sr.ht/{repo}"), ...) |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
% Generated by roxygen2: do not edit by hand |
|||
% Please edit documentation in R/install-sourcehut.R |
|||
\name{install_sourcehut} |
|||
\alias{install_sourcehut} |
|||
\title{Install a package from a SourceHut git repository} |
|||
\usage{ |
|||
install_sourcehut(repo, ...) |
|||
} |
|||
\arguments{ |
|||
\item{repo}{Repository address in the format \code{username/repo}. You can specify \code{subdir} and/or \code{ref} using the |
|||
respective parameters (via \code{...}).} |
|||
|
|||
\item{...}{passed on to \code{\link[remotes:install_git]{remotes::install_git()}}} |
|||
} |
|||
\description{ |
|||
Works like \code{\link[remotes:install_gitlab]{remotes::install_gitlab()}}, \code{\link[remotes:install_bitbucket]{remotes::install_bitbucket()}}, \code{\link[remotes:install_github]{remotes::install_github()}} (etc). |
|||
You can also omit the leading tilde ("~") from the username portion of the repository address |
|||
} |
Loading…
Reference in new issue