diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-04-29 10:34:53 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-04-29 10:34:53 -0600 |
commit | ba6a4a66fda85ebe1162e1ec4d74e09d6bf4991c (patch) | |
tree | a873fdee37c533a3be94df1f719e9415ba6eebea /nuttx/tools/mkconfigvars.sh | |
parent | 1a5a20e0528a993dd8d3badf2983ce166939796b (diff) | |
download | nuttx-ba6a4a66fda85ebe1162e1ec4d74e09d6bf4991c.tar.gz nuttx-ba6a4a66fda85ebe1162e1ec4d74e09d6bf4991c.tar.bz2 nuttx-ba6a4a66fda85ebe1162e1ec4d74e09d6bf4991c.zip |
More improvements to zipme.sh tool
Diffstat (limited to 'nuttx/tools/mkconfigvars.sh')
-rwxr-xr-x | nuttx/tools/mkconfigvars.sh | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/nuttx/tools/mkconfigvars.sh b/nuttx/tools/mkconfigvars.sh index 011599659..feb188a32 100755 --- a/nuttx/tools/mkconfigvars.sh +++ b/nuttx/tools/mkconfigvars.sh @@ -32,6 +32,45 @@ # POSSIBILITY OF SUCH DAMAGE. # +USAGE="USAGE: $0 [-d|h] [-v <major.minor>]" +ADVICE="Try '$0 -h' for more information" + +unset VERSION + +while [ ! -z "$1" ]; do + case $1 in + -v ) + shift + VERSION=$1 + ;; + -d ) + set -x + ;; + -h ) + echo "$0 is a tool for generation of configuration variable documentation" + echo "" + echo $USAGE + echo "" + echo "Where:" + echo " -v <major.minor>" + echo " The NuttX version number expressed as a major and minor number separated" + echo " by a period" + echo " -d" + echo " Enable script debug" + echo " -h" + echo " show this help message and exit" + exit 0 + ;; + * ) + echo "Unrecognized option: ${1}" + echo $USAGE + echo $ADVICE + exit 1 + ;; + esac + shift +done + # Find the directory we were executed from and were we expect to # see the directories to tar up @@ -44,18 +83,12 @@ KCONFIG2MAKEDIR=tools HTMLFILE=Documentation/NuttXConfigVariables.html BKUPFILE=Documentation/NuttXConfigVariables.bkp -# A version argument may be provided - -if [ ! -z "${1}" ]; then - VERSION=${1} -fi - if [ -x ./${MYNAME} ] ; then cd .. || { echo "ERROR: cd .. failed" ; exit 1 ; } fi if [ ! -x tools/${MYNAME} ] ; then - echo "ERROR: This file must be executed from the top-level NuttX directory" + echo "ERROR: This file must be executed from the top-level NuttX directory: $PWD" exit 1 fi |