From 69cc7c34f359d5dd07b267ae603a94b0be5f81c0 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 5 May 2015 22:40:38 +0000 Subject: [PATCH] Add update-fullfilelist --- roles/bodhi/backend/files/update-fullfilelist | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 roles/bodhi/backend/files/update-fullfilelist diff --git a/roles/bodhi/backend/files/update-fullfilelist b/roles/bodhi/backend/files/update-fullfilelist new file mode 100755 index 0000000000..0302c6a5b6 --- /dev/null +++ b/roles/bodhi/backend/files/update-fullfilelist @@ -0,0 +1,20 @@ +#!/bin/bash + +# currently runs on releng2.fedora.phx.redhat.com + +MOD=$1 +[ -z "$MOD" ] && { + echo "usage: $0 " + exit 1 +} + +TMPFILE=$(mktemp -p /tmp/) +pushd /pub/$MOD > /dev/null +find * -print > $TMPFILE +if diff $TMPFILE fullfilelist > /dev/null; then + rm -f $TMPFILE +else + mv $TMPFILE fullfilelist +fi +chmod 0644 fullfilelist +popd > /dev/null