diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2015-08-29 08:22:51 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2015-08-29 08:22:51 -0300 |
commit | bd16b61a2be9d158778244c3e2b184a65a496e5d (patch) | |
tree | c8c31f7fead3dccbb7b6ca49838c3ec627b922f2 /src/bin/db-pkg-rm | |
parent | c7f15e3d643c6ab4537b7355b7544b84aabf6039 (diff) |
replace all db-* exec with xbs, create all db-* compability, and add DISTRO_TYPE on all platform configs
Diffstat (limited to 'src/bin/db-pkg-rm')
-rwxr-xr-x | src/bin/db-pkg-rm | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/bin/db-pkg-rm b/src/bin/db-pkg-rm deleted file mode 100755 index 1a651c4..0000000 --- a/src/bin/db-pkg-rm +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -# Remove package to repository defined in config -# Copyright (C) 2012-2015 Parabola Hackers <https://www.parabola.nu> - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -CONFIG_DIR="$(dirname "$(readlink -e "${0}")")/etc" - -source "${CONFIG_DIR}/xbs.cfg" -source "${SHARE_DIR}/db-functions" - -if [ "${#}" -lt '4' ]; then - msg "usage: %s <platform> <repo> <arch> <pkg_name> ..." "${0##*/}" - exit 1 -fi - -plataform="${1}" -repo="${2}" -arch="${3}" -pkg_names=("${@:4}") - -for '_platform' in "${PLATFORMS[@]}"; do - # Rename ("${plataform}") to easily script usage - _platform_name="${plataform/\//+}" _platform_name="${_platform_name,,}" - - if [ "${_platform_name}" == "${_platform}" ]; then - source "${CONFIG_DIR}/xbs.d/${_platform}.cfg" - - repo_path="${REPO_DIR}/${repo}/os" - - if ! check_repo_permission "${repo}"; then - die "You don't have permission to remove packages to %s" "${repo}" - fi - - if [ "${arch}" == "{any}" ]; then - tarches=("${ARCHES[@]}") - else - tarches=("${arch}") - fi - - for 'tarch' in "${tarches[@]}"; do - if [[ ! -d "${repo_path} ]]; then - die "This [%s] doesn't exist" "${repo}" - elif [[ ! -d "${repo_path}/${tarch}" ]]; then - die "This [%s] doesn't support %s archictecture" "${repo}" "${arch}" - else - repo_lock "${repo}" "${tarch}" || exit 1 - fi - done - - for 'tarch' in "${tarches[@]}"; do - for 'pkg_name' in "${pkg_names[@]}"; do - msg "Removing %s from [%s]..." "${pkg_name}" "${repo}" - done - pkg_repo_rm "${repo}" "${tarch}" "${pkgnames[@]}" - repo_unlock "${repo}" "${tarch}" - done - else - die "This %s plataform doesn't exist" "${plataform}" - fi -done |