changeset 558:9a961c5ba31c

Improve performance by eliminating unnecessary checks for file existing.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Wed, 16 Oct 2013 18:57:50 +0300
parents 1cea6989b7e0
children 204a1812d0d9
files misc/mymake.sh
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/misc/mymake.sh	Mon Oct 07 21:36:39 2013 +0300
+++ b/misc/mymake.sh	Wed Oct 16 18:57:50 2013 +0300
@@ -19,12 +19,9 @@
 dir="$PWD"
 while [[ -n "$dir" ]]; do
   cd "$dir"
-  if [[ -f "$dir"/"$fname" ]]; then
-    if [[ $fname == *[mM]ake* ]]; then
+  if [[ $fname == *[mM]ake* ]]; then
+    if [[ -f "$dir"/"$fname" ]]; then
       execute make "$@"
-    else
-      echo "Can't recognise '$fname' type."
-      exit 1
     fi
   fi
   if [[ -f "$dir"/Makefile ]]; then