Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 263 Bytes

File metadata and controls

18 lines (13 loc) · 263 Bytes

Use a main() function

Wrap all the code in a main() function that gets called at the bottom of the file, so that a truncated partial download doesn't accidentally end up executing half a script.

Example:

#!/bin/sh
set -eu

main() {
    …
}

main