Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib/db/update.sh
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2022-12-11 16:16:16 +0100
committerLevente Polyak <anthraxx@archlinux.org>2023-05-19 22:27:13 +0200
commitf834fc4700053cb9a83956c98835b0a158cc054c (patch)
tree31a3e646a262478079c3d03c94683a94d7672ad9 /src/lib/db/update.sh
parent8b5bcd01b47845e6459a0ceef2f0eaf898482382 (diff)
db: command for Pacman database modification like update, move etc
Diffstat (limited to 'src/lib/db/update.sh')
-rw-r--r--src/lib/db/update.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/lib/db/update.sh b/src/lib/db/update.sh
new file mode 100644
index 0000000..269720d
--- /dev/null
+++ b/src/lib/db/update.sh
@@ -0,0 +1,46 @@
+#!/hint/bash
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+[[ -z ${DEVTOOLS_INCLUDE_DB_UPDATE_SH:-} ]] || return 0
+DEVTOOLS_INCLUDE_DB_UPDATE_SH=1
+
+_DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
+# shellcheck source=src/lib/common.sh
+source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh
+
+set -e
+
+
+pkgctl_db_update_usage() {
+ local -r COMMAND=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
+ cat <<- _EOF_
+ Usage: ${COMMAND} [OPTIONS]
+
+ Update the binary repository as final release step for packages that
+ have been transfered and staged on ${PACKAGING_REPO_RELEASE_HOST}.
+
+ OPTIONS
+ -h, --help Show this help text
+
+ EXAMPLES
+ $ ${COMMAND}
+_EOF_
+}
+
+pkgctl_db_update() {
+ # option checking
+ while (( $# )); do
+ case $1 in
+ -h|--help)
+ pkgctl_db_update_usage
+ exit 0
+ ;;
+ *)
+ die "invalid argument: %s" "$1"
+ ;;
+ esac
+ done
+
+ ssh "${PACKAGING_REPO_RELEASE_HOST}" db-update
+}