From bc0d9b10b68687b71e0d825b01391d556624c5fd Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 17 Aug 2019 10:15:16 +0200 Subject: removed superfluous script --- bin/find-double-packages | 79 ------------------------------------------------ 1 file changed, 79 deletions(-) delete mode 100755 bin/find-double-packages (limited to 'bin') diff --git a/bin/find-double-packages b/bin/find-double-packages deleted file mode 100755 index 1732b5b..0000000 --- a/bin/find-double-packages +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -# shellcheck disable=SC2119,SC2120 - -# shellcheck source=../lib/load-configuration -. "${0%/*}/../lib/load-configuration" - -usage() { - >&2 echo '' - >&2 echo 'find-double-packages: find packages which are double on the mirror.' - >&2 echo '' - >&2 echo 'possible options:' - >&2 echo ' -h|--help:' - >&2 echo ' Show this help and exit.' - >&2 echo ' -m|--mirror-dir location of the mirror files' - [ -z "$1" ] && exit 1 || exit "$1" -} - -eval set -- "$( - getopt -o hm: \ - --long help \ - --long mirror: \ - -n "$(basename "$0")" -- "$@" || \ - echo usage -)" - -mirror='' -no_action=false -wait_for_lock='-n' - -while true -do - case "$1" in - -h|--help) - usage 0 - ;; - -m|--mirror) - if [ -n "${mirror}" ]; then - >&2 echo 'Already have one -m flag.' - usage - fi - shift - mirror="$1" - ;; - --) - shift - break - ;; - *) - >&2 echo 'Whoops, forgot to implement option "'"$1"'" internally.' - exit 42 - ;; - esac - shift -done - -if [ $# -ne 0 ]; then - >&2 echo 'Too many arguments.' - usage -fi - -if [ -z "${mirror}" ]; then - >&2 echo 'Flag -m missing' - usage -fi - -pooldir="${mirror}/pool" -poolfiles="/tmp/files_in_pool" -find "${pooldir}" -type f -name '*pkg.tar.xz' | \ - rev | cut -f 1 -d / | rev | sort >"${poolfiles}" - -for arch in i486 i686 pentium4; do - for repo in core extra community; do - packagedir=${mirror}/${arch}/${repo}/ - find "$packagedir" -type l -name '*pkg.tar.xz' >"/tmp/files_in_repo_${arch}_${repo}" - done -done - - -- cgit v1.2.3-54-g00ecf