summaryrefslogtreecommitdiff
path: root/repo/bin/copy-dist-to-archive
blob: 3db11052d235cc95583274691e3100b718134205 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -eux

PATH=$PATH:/srv/apt/repo/bin
DIST="$1"
case $DIST in
  *-pgdg) ;;
  *) echo "$DIST must match *-pgdg"
     exit 1 ;;
esac

cd /srv/apt
test -d repo/dists/$DIST

cp -a repo/dists/$DIST archive/pub/repos/apt/dists

find archive/pub/repos/apt/dists/$DIST -type d | xargs --verbose -n1 indexhtml

# sync everything to S3
generate-archive-lists