diff --git a/CHANGELOG.md b/CHANGELOG.md index 42d68a9..c79d36f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp ### Changed +* extract "include_files" function + ### Deprecated ### Removed diff --git a/minifirewall b/minifirewall index 3922e88..259770e 100755 --- a/minifirewall +++ b/minifirewall @@ -254,10 +254,16 @@ source_configuration() { source_file_or_error "${config_file}" fi } +include_files() { + if [ -d "${includes_dir}" ]; then + find ${includes_dir} -type f -readable -not -name '*.*' | sort -h + else + echo "" + fi +} source_includes() { 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}" done fi