Only copy cleanup script if it has changed
This commit is contained in:
parent
6122296b59
commit
7586c716d4
|
@ -545,7 +545,15 @@ function email_archiving {
|
||||||
git checkout $CLEANUP_MAILDIR_COMMIT -b $CLEANUP_MAILDIR_COMMIT
|
git checkout $CLEANUP_MAILDIR_COMMIT -b $CLEANUP_MAILDIR_COMMIT
|
||||||
set_completion_param "cleanup-maildir commit" "$CLEANUP_MAILDIR_COMMIT"
|
set_completion_param "cleanup-maildir commit" "$CLEANUP_MAILDIR_COMMIT"
|
||||||
|
|
||||||
|
if [ ! -f /usr/bin/cleanup-maildir ]; then
|
||||||
cp $INSTALL_DIR/cleanup-maildir/cleanup-maildir /usr/bin
|
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
|
mark_completed $FUNCNAME
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue