diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 14:29:19 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 14:29:19 -0500 |
commit | f1ed4b1d81dcaa04bfdf49e36f3b5e3cc5dfa338 (patch) | |
tree | 3a8d1377c3da73c7842e7ea2e1e484adb892c253 /makechrootpkg.in | |
parent | aa11acaf52dfd101cb6fe6f7137d2cbd5c8e0d9b (diff) |
lib/common.sh: Make it safe to include multiple times.
This is similar to common C #ifdef guards.
I was tempted to wrap the entire thing in the if/fi (rather than use
'return' to bail early. However, that means it won't execute anything
until after it reaches 'fi'. And if `shopt -s extglob` isn't executed
before parsing, then it will syntax-error on the extended globs. One
solution would have been to move `shopt -s extglob` up above the
include-guard. But the committed solution is all-around simpler.
Diffstat (limited to 'makechrootpkg.in')
0 files changed, 0 insertions, 0 deletions