Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib/repo.sh
diff options
context:
space:
mode:
authorChristian Heusel <christian@heusel.eu>2023-04-15 19:44:22 +0200
committerLevente Polyak <anthraxx@archlinux.org>2023-05-20 00:08:13 +0200
commited966351410b39bfcec749df59dbc434a5dade1e (patch)
treee32d30d3bc2f14d5bc2b3b19b71491034a228a3a /src/lib/repo.sh
parentf961e2e94803dd46c4fa5941eb15a7d4612bd0f0 (diff)
pkgctl repo: introduce the switch subcommand
Signed-off-by: Christian Heusel <christian@heusel.eu> Co-Authored-By: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'src/lib/repo.sh')
-rw-r--r--src/lib/repo.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/repo.sh b/src/lib/repo.sh
index 6b3817a..9f545e9 100644
--- a/src/lib/repo.sh
+++ b/src/lib/repo.sh
@@ -30,6 +30,7 @@ pkgctl_repo_usage() {
clone Clone a package repository
configure Configure a clone according to distro specs
create Create a new GitLab package repository
+ switch Switch a package repository to a specified version
web Open the packaging repository's website
OPTIONS
@@ -40,6 +41,7 @@ pkgctl_repo_usage() {
$ ${COMMAND} clone --maintainer mynickname
$ ${COMMAND} configure *
$ ${COMMAND} create libfoo
+ $ ${COMMAND} switch 2:1.19.5-1 libfoo
$ ${COMMAND} web linux
_EOF_
}
@@ -81,6 +83,14 @@ pkgctl_repo() {
pkgctl_repo_create "$@"
exit 0
;;
+ switch)
+ _DEVTOOLS_COMMAND+=" $1"
+ shift
+ # shellcheck source=src/lib/repo/switch.sh
+ source "${_DEVTOOLS_LIBRARY_DIR}"/lib/repo/switch.sh
+ pkgctl_repo_switch "$@"
+ exit 0
+ ;;
web)
_DEVTOOLS_COMMAND+=" $1"
shift