extract "include_files" function
This commit is contained in:
parent
8271602a30
commit
71e49db330
|
@ -7,6 +7,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* extract "include_files" function
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
10
minifirewall
10
minifirewall
|
@ -254,10 +254,16 @@ source_configuration() {
|
||||||
source_file_or_error "${config_file}"
|
source_file_or_error "${config_file}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
include_files() {
|
||||||
|
if [ -d "${includes_dir}" ]; then
|
||||||
|
find ${includes_dir} -type f -readable -not -name '*.*' | sort -h
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
source_includes() {
|
source_includes() {
|
||||||
if [ -d "${includes_dir}" ]; then
|
if [ -d "${includes_dir}" ]; then
|
||||||
include_files=$(find ${includes_dir} -type f -readable -not -name '*.*' | sort -h)
|
for include_file in $(include_files); do
|
||||||
for include_file in ${include_files}; do
|
|
||||||
source_file_or_error "${include_file}"
|
source_file_or_error "${include_file}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue