mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-13 16:29:46 +08:00
Add a fullfiletimelist file with timestamps for fedora/epel changes to master mirrors
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# currently runs on releng2.fedora.phx.redhat.com
|
||||
# currently runs on bodhi-backend01 after updates pushes
|
||||
|
||||
MOD=$1
|
||||
[ -z "$MOD" ] && {
|
||||
@@ -8,6 +8,8 @@ MOD=$1
|
||||
exit 1
|
||||
}
|
||||
|
||||
# This is the old traditional fullfilelist with no timestamps
|
||||
|
||||
TMPFILE=$(mktemp -p /tmp/)
|
||||
pushd /pub/$MOD > /dev/null
|
||||
find * -print > $TMPFILE
|
||||
@@ -18,3 +20,16 @@ else
|
||||
fi
|
||||
chmod 0644 fullfilelist
|
||||
popd > /dev/null
|
||||
|
||||
# This is the new list with timestamps
|
||||
|
||||
TMPFILE=$(mktemp -p /tmp/)
|
||||
pushd /pub/$MOD > /dev/null
|
||||
/usr/bin/rsync --no-h --list-only -r . > $TMPFILE
|
||||
if diff $TMPFILE fullfiletimelist > /dev/null; then
|
||||
rm -f $TMPFILE
|
||||
else
|
||||
mv $TMPFILE fullfiletimelist
|
||||
fi
|
||||
chmod 0644 fullfiletimelist
|
||||
popd > /dev/null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# currently runs on releng2.fedora.phx.redhat.com
|
||||
# currently runs on bodhi-backend01 after updates pushes
|
||||
|
||||
MOD=$1
|
||||
[ -z "$MOD" ] && {
|
||||
@@ -8,6 +8,8 @@ MOD=$1
|
||||
exit 1
|
||||
}
|
||||
|
||||
# This is the old traditional fullfilelist with no timestamps
|
||||
|
||||
TMPFILE=$(mktemp -p /tmp/)
|
||||
pushd /pub/$MOD > /dev/null
|
||||
find * -print > $TMPFILE
|
||||
@@ -18,3 +20,16 @@ else
|
||||
fi
|
||||
chmod 0644 fullfilelist
|
||||
popd > /dev/null
|
||||
|
||||
# This is the new list with timestamps
|
||||
|
||||
TMPFILE=$(mktemp -p /tmp/)
|
||||
pushd /pub/$MOD > /dev/null
|
||||
/usr/bin/rsync --no-h --list-only -r . > $TMPFILE
|
||||
if diff $TMPFILE fullfiletimelist > /dev/null; then
|
||||
rm -f $TMPFILE
|
||||
else
|
||||
mv $TMPFILE fullfiletimelist
|
||||
fi
|
||||
chmod 0644 fullfiletimelist
|
||||
popd > /dev/null
|
||||
|
||||
Reference in New Issue
Block a user