write to publish sh