From: Travis Cross Date: Tue, 14 Jan 2014 22:34:36 +0000 (+0000) Subject: Refactor check in debian bootstrap X-Git-Tag: v1.5.8~25^2~365 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b382ea0f29a2537d079b653376eab9d9b9b3ee7;p=thirdparty%2Ffreeswitch.git Refactor check in debian bootstrap --- diff --git a/debian/bootstrap.sh b/debian/bootstrap.sh index aea8a3fe68..d1451bb6ce 100755 --- a/debian/bootstrap.sh +++ b/debian/bootstrap.sh @@ -146,20 +146,19 @@ mod_filter_show () { map_fs_modules () { local filterfn="$1" percatfns="$2" permodfns="$3" for x in $mod_dir/*; do - if test -d $x; then - category=${x##*/} category_path=$x - for f in $percatfns; do $f; done - for y in $x/*; do - module_name=${y##*/} module_path=$y - module=$category/$module_name - if $filterfn $category/$module; then - [ -f ${y}/module ] && . ${y}/module - for f in $permodfns; do $f; done - fi - unset module_name module_path module - done - unset category category_path - fi + test -d $x || continue + category=${x##*/} category_path=$x + for f in $percatfns; do $f; done + for y in $x/*; do + module_name=${y##*/} module_path=$y + module=$category/$module_name + if $filterfn $category/$module; then + [ -f ${y}/module ] && . ${y}/module + for f in $permodfns; do $f; done + fi + unset module_name module_path module + done + unset category category_path done }