diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-05 07:37:44 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-05 07:37:44 -0600 |
commit | 23086a0707f03cc68b6af6904b69b3343ab0f8a0 (patch) | |
tree | 09f07bebb1736be9fc3d70ed124941aa13f96012 | |
parent | 5a787f8714faf1d16d825ce60d301ca5be2bb3ee (diff) | |
download | px4-nuttx-23086a0707f03cc68b6af6904b69b3343ab0f8a0.tar.gz px4-nuttx-23086a0707f03cc68b6af6904b69b3343ab0f8a0.tar.bz2 px4-nuttx-23086a0707f03cc68b6af6904b69b3343ab0f8a0.zip |
Add the .config file to the export package
-rwxr-xr-x | apps/tools/mkimport.sh | 10 | ||||
-rwxr-xr-x | nuttx/tools/mkexport.sh | 23 |
2 files changed, 27 insertions, 6 deletions
diff --git a/apps/tools/mkimport.sh b/apps/tools/mkimport.sh index 1d477b71a..38e48f010 100755 --- a/apps/tools/mkimport.sh +++ b/apps/tools/mkimport.sh @@ -165,6 +165,16 @@ fi mv ${SALLDIRS} ${IMPORTDIR}/. || \ { echo "ERROR: Failed to move ${SALLDIRS} to ${IMPORTDIR}"; exit 1; } +# Move the .config file in place in the import directory + +SFILES=".config" +for file in ${SFILES}; do + if [ -f "${EXPORTDIR}/${file}" ]; then + cp -a ${EXPORTDIR}/${file} ${IMPORTDIR}/${file} || \ + { echo "ERROR: Failed to copy ${EXPORTDIR}/${file} to ${IMPORTDIR}/${file}"; exit 1; } + fi +done + # Finally, remove the temporary directory cd ${WD} || { echo "ERROR: Failed to cd to ${WD}"; exit 1; } diff --git a/nuttx/tools/mkexport.sh b/nuttx/tools/mkexport.sh index 6b16e4b07..18087d480 100755 --- a/nuttx/tools/mkexport.sh +++ b/nuttx/tools/mkexport.sh @@ -97,13 +97,26 @@ if [ ! -d "${TOPDIR}" ]; then exit 1 fi -# Get the version string +# Check configuration +# Verify that we have Make.defs, .config, and .version files. + +if [ ! -f "${TOPDIR}/Make.defs" ]; then + echo "MK: Directory ${TOPDIR}/Make.defs does not exist" + exit 1 +fi + +if [ ! -f "${TOPDIR}/.config" ]; then + echo "MK: Directory ${TOPDIR}/.config does not exist" + exit 1 +fi if [ ! -f "${TOPDIR}/.version" ]; then echo "MK: File ${TOPDIR}/.version does not exist" exit 1 fi +# Get the version string + source "${TOPDIR}/.version" if [ ! -z "${CONFIG_VERSION_STRING}" -a "${CONFIG_VERSION_STRING}" != "0.0" ]; then VERSION="-${CONFIG_VERSION_STRING}" @@ -138,12 +151,10 @@ if [ "X${USRONLY}" != "Xy" ]; then mkdir "${EXPORTDIR}/arch" || { echo "MK: 'mkdir ${EXPORTDIR}/arch' failed"; exit 1; } fi -# Verify that we have a Make.defs file. +# Copy the .config file -if [ ! -f "${TOPDIR}/Make.defs" ]; then - echo "MK: Directory ${TOPDIR}/Make.defs does not exist" - exit 1 -fi +cp -a "${TOPDIR}/.config" "${EXPORTDIR}/.config" || + { echo "MK: Failed to copy ${TOPDIR}/.config to ${EXPORTDIR}/.config"; exit 1; } # Copy the Make.defs files, but disable windows path conversions |