Add a fullfiletimelist file with timestamps for fedora/epel changes to master mirrors

This commit is contained in:
Kevin Fenzi
2016-05-04 16:08:08 +00:00
parent 1d90ea31dd
commit e55c8f37c0
2 changed files with 32 additions and 2 deletions

View File

@@ -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

View File

@@ -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