summaryrefslogtreecommitdiff
path: root/nuttx/tools/configure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/tools/configure.sh')
-rwxr-xr-xnuttx/tools/configure.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/nuttx/tools/configure.sh b/nuttx/tools/configure.sh
index ad82b457e..8e56c2a0e 100755
--- a/nuttx/tools/configure.sh
+++ b/nuttx/tools/configure.sh
@@ -118,8 +118,25 @@ fi
# Check for the apps/ dir in the usual place if appdir was not provided
if [ -z "${appdir}" ]; then
+
+ # Check for a version file
+
+ unset CONFIG_NUTTX_VERSION
+ if [ -x "${TOPDIR}/.version" ]; then
+ source "${TOPDIR}/.version"
+ fi
+
+ # Check for an unversioned apps/ directory
+
if [ -d "${TOPDIR}/../apps" ]; then
appdir="../apps"
+
+ else
+ # Check for a versioned apps/ directory
+
+ if [ -d "${TOPDIR}/../apps-${CONFIG_NUTTX_VERSION}" ]; then
+ appdir="../apps-${CONFIG_NUTTX_VERSION}"
+ fi
fi
fi