summaryrefslogtreecommitdiff
path: root/nuttx/tools
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-04-29 08:57:46 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-04-29 08:57:46 -0600
commit48b81282b855899a602f2af8893a563e460b7b9b (patch)
tree1cecaf3215f02516ef298e3976025ea9927057af /nuttx/tools
parenta44876809603a12f918107839a1c3ed464dec5ba (diff)
downloadpx4-nuttx-48b81282b855899a602f2af8893a563e460b7b9b.tar.gz
px4-nuttx-48b81282b855899a602f2af8893a563e460b7b9b.tar.bz2
px4-nuttx-48b81282b855899a602f2af8893a563e460b7b9b.zip
Add option to zipme.sh to provide the build ID on the command line
Diffstat (limited to 'nuttx/tools')
-rwxr-xr-xnuttx/tools/version.sh7
-rwxr-xr-xnuttx/tools/zipme.sh60
2 files changed, 59 insertions, 8 deletions
diff --git a/nuttx/tools/version.sh b/nuttx/tools/version.sh
index 8a6341040..dafd72772 100755
--- a/nuttx/tools/version.sh
+++ b/nuttx/tools/version.sh
@@ -36,7 +36,7 @@ WD=`pwd`
# Get command line parameters
-USAGE="USAGE: $0 [-d|-h] [-b build] -v <major.minor> <outfile-path>"
+USAGE="USAGE: $0 [-d|-h] [-b <build>] -v <major.minor> <outfile-path>"
ADVICE="Try '$0 -h' for more information"
unset VERSION
@@ -62,12 +62,15 @@ while [ ! -z "$1" ]; do
echo $USAGE
echo ""
echo "Where:"
+ echo " -b <build>"
+ echo " Use this build identification string. Default: use GIT build ID"
+ echo " NOTE: GIT build information may not be available in a snapshot"
echo " -d"
echo " Enable script debug"
echo " -h"
echo " show this help message and exit"
echo " -v <major.minor>"
- echo " The NuttX version number expressed a major and minor number separated"
+ echo " The NuttX version number expressed as a major and minor number separated"
echo " by a period"
echo " <outfile-path>"
echo " The full path to the version file to be created"
diff --git a/nuttx/tools/zipme.sh b/nuttx/tools/zipme.sh
index a8cd160ab..61d21c3c7 100755
--- a/nuttx/tools/zipme.sh
+++ b/nuttx/tools/zipme.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# zipme.sh
#
-# Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
+# Copyright (C) 2007-2011, 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -35,15 +35,62 @@
#set -x
WD=`pwd`
-VERSION=$1
TAR="tar cvf"
ZIP=gzip
+# Get command line parameters
+
+USAGE="USAGE: $0 [-d|h] [-b <build]> <major.minor>"
+ADVICE="Try '$0 -h' for more information"
+
+unset VERSION
+unset BUILD
+
+while [ ! -z "$1" ]; do
+ case $1 in
+ -b )
+ shift
+ BUILD="-b ${1}"
+ ;;
+ -d )
+ set -x
+ ;;
+ -h )
+ echo "$0 is a tool for generation of release versions of NuttX"
+ echo ""
+ echo $USAGE
+ echo ""
+ echo "Where:"
+ echo " -b <build>"
+ echo " Use this build identification string. Default: use GIT build ID"
+ echo " NOTE: GIT build information may not be available in a snapshot"
+ echo " -d"
+ echo " Enable script debug"
+ echo " -h"
+ echo " show this help message and exit"
+ echo " <major.minor>"
+ echo " The NuttX version number expressed as a major and minor number separated"
+ echo " by a period"
+ exit 0
+ ;;
+ * )
+ break;
+ ;;
+ esac
+ shift
+done
+
+# The last thing on the command line is the version number
+
+VERSION=$1
+
# Make sure we know what is going on
if [ -z ${VERSION} ] ; then
echo "You must supply a version like xx.yy as a parameter"
+ echo $USAGE
+ echo $ADVICE
exit 1;
fi
@@ -119,11 +166,12 @@ cp -f ../ChangeLog ChangeLog.txt
VERSIONSH=${NUTTX}/tools/version.sh
if [ ! -x "${VERSIONSH}" ]; then
- echo "No executable script was found at: ${VERSIONSH}"
- exit 1
+ echo "No executable script was found at: ${VERSIONSH}"
+ exit 1
fi
-${VERSIONSH} -v ${VERSION} ${NUTTX}/.version || \
- { echo "${VERSIONSH} failed"; cat ${NUTTX}/.version; exit 1; }
+
+${VERSIONSH} ${BUILD} -v ${VERSION} ${NUTTX}/.version || \
+ { echo "${VERSIONSH} failed"; cat ${NUTTX}/.version; exit 1; }
chmod 755 ${NUTTX}/.version
# Perform a full clean for the distribution