Skip to content
Snippets Groups Projects
Commit 7586c716 authored by Bob Mottram's avatar Bob Mottram
Browse files

Only copy cleanup script if it has changed

parent 6122296b
No related branches found
No related tags found
No related merge requests found
......@@ -545,7 +545,15 @@ function email_archiving {
git checkout $CLEANUP_MAILDIR_COMMIT -b $CLEANUP_MAILDIR_COMMIT
set_completion_param "cleanup-maildir commit" "$CLEANUP_MAILDIR_COMMIT"
cp $INSTALL_DIR/cleanup-maildir/cleanup-maildir /usr/bin
if [ ! -f /usr/bin/cleanup-maildir ]; then
cp $INSTALL_DIR/cleanup-maildir/cleanup-maildir /usr/bin
else
HASH1=$(sha256sum $INSTALL_DIR/cleanup-maildir/cleanup-maildir | awk -F ' ' '{print $1}')
HASH2=$(sha256sum /usr/bin/cleanup-maildir | awk -F ' ' '{print $1}')
if [[ "$HASH1" != "$HASH2" ]]; then
cp $INSTALL_DIR/cleanup-maildir/cleanup-maildir /usr/bin
fi
fi
mark_completed $FUNCNAME
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment