Rebuild resource script