Sync build system and CI scripts with ndn-tools

Change-Id: I21dc5349f3f3c819bf8590fe709157ce0bc26b44
diff --git a/.jenkins b/.jenkins
index 4daa40f..674d751 100755
--- a/.jenkins
+++ b/.jenkins
@@ -1,9 +1,10 @@
 #!/usr/bin/env bash
 set -e
 
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
 
-for i in `find "$DIR/.jenkins.d" -type f -perm +111 | sort`; do
-    echo "Run: $i"
-    $i
+for file in "$DIR"/.jenkins.d/*; do
+    [[ -f $file && -x $file ]] || continue
+    echo "Run: $file"
+    "$file"
 done