]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Refactor check in debian bootstrap
authorTravis Cross <tc@traviscross.com>
Tue, 14 Jan 2014 22:34:36 +0000 (22:34 +0000)
committerTravis Cross <tc@traviscross.com>
Tue, 14 Jan 2014 22:34:46 +0000 (22:34 +0000)
debian/bootstrap.sh

index aea8a3fe680b3dd7e8814e7cc37a0a2d648f4a8d..d1451bb6ce27e3852e720b7673604bc03d64f217 100755 (executable)
@@ -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
 }