We give a theoretical study of a double-cavity system in which a mechanical resonator beam is coupled to two cavity modes on both sides through radiation pressures. The indirect coupling between the cavities via the resonator sets up a correlation in the optomechanical entanglements between the two cavities with the common resonator. This correlation initiates an entanglement transfer from the intracavity photon-phonon entanglements to an intercavity photon-photon entanglement. Using numerical solutions, we show two distinct regimes of the optomechanical system, in which the indirect entanglement either builds up and eventually saturates or undergoes a death-and-revival cycle, after a time lapse for initiating the cooperative motion of the left and right cavity modes.