From 60051cba0cf424e01ef2eda09816ee8945867b6d Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 20 Mar 2011 22:07:56 +0000 Subject: More build fixes git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3407 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/tools/configure.sh | 17 +++++++++++++++++ nuttx/tools/zipme.sh | 10 +++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) (limited to 'nuttx/tools') 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 diff --git a/nuttx/tools/zipme.sh b/nuttx/tools/zipme.sh index 7c08bd271..bf8041a4f 100755 --- a/nuttx/tools/zipme.sh +++ b/nuttx/tools/zipme.sh @@ -132,11 +132,15 @@ if [ -f ${ZIP_NAME} ] ; then { echo "rm ${ZIP_NAME} failed!" ; exit 1 ; } fi -# Write a version file +# Write a version file. The syntax of file is such that it may be sourced +# by a bash script or included by a Makefile -echo "CONFIG_NUTTX_VERSION=\"${VERSION}\" >${NUTTX}/.version +echo "#!/bin/bash" >${NUTTX}/.version +echo "" >>${NUTTX}/.version +echo "CONFIG_NUTTX_VERSION=\"${VERSION}\" >>${NUTTX}/.version +chmod 755 ${NUTTX}/.version -# Then zip it +# Then zip-up the directories ${TAR} ${TAR_NAME} nuttx-${VERSION}/nuttx nuttx-${VERSION}/apps || \ { echo "tar of ${TAR_NAME} failed!" ; exit 1 ; } -- cgit v1.2.3