blob: 08797584d14b9e5d7ac019c2631ac41c31949fdc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/bash
# Copyright 2011-2015 Gentoo Foundation; Distributed under the GPL v2
umask 022 # ensure globally readable perms on new files for rsyncd
source /usr/local/bin/mastermirror/rsync-gen.vars
# The only time ${STAGEDIR}/metadata should not exist is when rsync-gen.sh
# hasn't ran even once yet
if [[ -d ${STAGEDIR}/metadata ]]; then
/bin/date -u '+%s %c' > ${STAGEDIR}/metadata/timestamp.x.tmp
/bin/mv ${STAGEDIR}/metadata/timestamp.x.tmp ${STAGEDIR}/metadata/timestamp.x
fi
if [[ -d ${FINALDIR}/metadata ]]; then
/bin/date -R -u > ${FINALDIR}/metadata/timestamp.chk.tmp
/bin/mv ${FINALDIR}/metadata/timestamp.chk.tmp ${FINALDIR}/metadata/timestamp.chk
fi
|