summaryrefslogtreecommitdiff
path: root/file-conflicts
blob: c37a58679f7d9bcdc5a5cad86e69c8e733849ebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

pkgDirBase="/srv/arch-mirror/arch/arch"
pkgDir="${pkgDirBase}/archlinuxewe/os"
pkgDir32="${pkgDirBase}/archlinux32/x86_64/releng"

ssh -p 22222 makepkg@141.35.51.219 '
  find "'"${pkgDir}"'" "'"${pkgDir32}"'" \
    -name "any" \
    -prune \
    , \
    -name "*.files.tar.gz" \
    -printf '"'"'%p\n'"'"' \
  | while read -r repo; do
    short_repo="${repo%/*}"
    short_repo="${short_repo##*/}"
    tar -xf "${repo}" --wildcards "*/files" --to-command '"'"'sed "s,^,$TAR_FILENAME ,"'"'"' \; 2>/dev/null \
    | sed "
      / %FILES%\$/ d
      /\/\$/ d
      s,^\(\S\+\)/\S\+ ,\1 ${short_repo} ,
    "
  done
' \
| sort -k2,2 -k3,3 \
| uniq -Df1