Shake a Leg

What does the idiom “shake a leg” mean?

Definition: hurry, get started promptly

Example: We still have time to make the train, but you’d better shake a leg so we can leave.