Section 20C. If from the examination before such court or justice it appears that the person held is the person charged with having committed the crime alleged, including cases arising under section thirteen, or is the person charged with having been convicted of a crime and having escaped from confinement or having broken the terms of his bail, probation or parole, such court or justice shall, by a warrant reciting the accusation, commit him to a jail or house of correction for such time, not exceeding thirty days and specified in the warrant, as will enable the arrest of the accused to be made under a warrant of the governor, on a requisition of the executive authority of the state having jurisdiction of the crime, unless the accused gives bail as provided in the following section, or until he shall be legally discharged.