From 13094c2ab3384971d952d5a532fe3ba04b18a10d Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Mon, 14 Dec 2015 17:49:02 +0000
Subject: [PATCH] wcleanAll, wrmdep: Updated check for the WM_PROJECT_DIR

---
 wmake/wcleanAll | 3 ++-
 wmake/wrmdep    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/wmake/wcleanAll b/wmake/wcleanAll
index f4dfaf5f3a5..e26504b7e05 100755
--- a/wmake/wcleanAll
+++ b/wmake/wcleanAll
@@ -61,7 +61,8 @@ do
     esac
 done
 
-[ -d bin -a -d src ] || usage "not in the project top level directory"
+[ "$PWD" = "$WM_PROJECT_DIR" ] \
+    || usage "Not in the project top-level directory"
 
 
 echo "Removing platforms/sub-directories"
diff --git a/wmake/wrmdep b/wmake/wrmdep
index cea58c901a9..7853279684d 100755
--- a/wmake/wrmdep
+++ b/wmake/wrmdep
@@ -190,7 +190,8 @@ oldFolders)
 
 updateMode)
 
-    [ -d bin -a -d src ] || usage "Not in the project top-level directory"
+    [ "$PWD" = "$WM_PROJECT_DIR" ] \
+        || usage "Not in the project top-level directory"
 
     echo "Purging all dep files that relate to files that no longer exist..."
     fileNameList=$(find -L src applications -name '*.[CHL]' -type l \
-- 
GitLab