summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/bin/db-pkg-add (renamed from src/bin/db-repo-add)20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/bin/db-repo-add b/src/bin/db-pkg-add
index c31fdd9..509161f 100755
--- a/src/bin/db-repo-add
+++ b/src/bin/db-pkg-add
@@ -6,18 +6,18 @@ source "${CONFIG_DIR}/dbscripts.d/db-functions.cfg"
source "${CONFIG_DIR}/dbscripts.d/main.cfg"
source "${CONFIG_DIR}/dbscripts.cfg"
-db-repo-add_usage() {
+db-pkg-add_usage() {
"usage: %s [-p platform] <repo> <arch> <pkgfile> ..." "${0##*/}"
exit 1
}
-db-repo-add_check-repo-permission() {
+db-pkg-add_check-repo-permission() {
if ! check_repo_permission "$repo"; then
die "You don't have permission to add packages to %s" "${repo}"
fi
}
-db-repo-add_check-arch-if-any() {
+db-pkg-add_check-arch-if-any() {
if [ "$arch" == "any" ]; then
tarches=("${ARCHES[@]}")
else
@@ -25,9 +25,9 @@ db-repo-add_check-arch-if-any() {
fi
}
-db-repo-add_exec() {
- db-repo-add_check-repo-permission
- db-repo-add_check-arch-if-any
+db-pkg-add_exec() {
+ db-pkg-add_check-repo-permission
+ db-pkg-add_check-arch-if-any
for tarch in "${tarches[@]}"; do
repo_lock "$repo" "$tarch" || exit 1
for pkg_file in "${pkg_files[@]}"; do
@@ -46,7 +46,7 @@ for 'platform' in "${PLATFORMS[@]}"; do
case "$1" in
--platform|-platform|-p)
if [ $# -lt 5 ]; then
- db-repo-add-usage
+ db-pkg-add-usage
fi
# Rename plataform name ($2) to easily script usage
@@ -60,12 +60,12 @@ for 'platform' in "${PLATFORMS[@]}"; do
pkg_files=("${@:3}")
repo_path="${REPO_DIR}/${_platform_name}/${repo}/os"
- db-repo-add_run
+ db-pkg-add_run
fi
;;
*)
if [ $# -lt 3 ]; then
- db-repo-add-usage
+ db-pkg-add-usage
fi
source "${CONFIG_DIR}/dbscripts.d/${platform}.cfg"
@@ -75,7 +75,7 @@ for 'platform' in "${PLATFORMS[@]}"; do
pkg_files=("${@:3}")
repo_path="${REPO_DIR}/${platform}/${repo}/os"
- db-repo-add_run
+ db-pkg-add_run
;;
esac
done