summaryrefslogtreecommitdiff
path: root/devel/arduino-mk/files/version.sh
diff options
context:
space:
mode:
authorMichael Scheidell <scheidell@FreeBSD.org>2012-02-23 14:20:36 +0000
committerMichael Scheidell <scheidell@FreeBSD.org>2012-02-23 14:20:36 +0000
commit20c764411325cd53e20cf05f6453ca93b1e1da9b (patch)
tree20f6398ed4d65d43008d6c2ccc9976bf0fec8ea3 /devel/arduino-mk/files/version.sh
parent- Update to 1.2.1 [1] (diff)
Add port devel/arduino-mk: Arduino from the command line
This is a makefile written by Martin Atelier that makes it possible to build Arduino sketches with gmake. An example sketch and Makefile; it is installed in share/examples/arduino-mk PR: ports/156143 Submitted by: Craig Leres <leres@ee.lbl.gov> (maintainer) Approved by: gabor (mentor, implicit) Feature safe: yes
Diffstat (limited to 'devel/arduino-mk/files/version.sh')
-rw-r--r--devel/arduino-mk/files/version.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/devel/arduino-mk/files/version.sh b/devel/arduino-mk/files/version.sh
new file mode 100644
index 000000000000..18d94d3b859d
--- /dev/null
+++ b/devel/arduino-mk/files/version.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# @(#) $Id: version.sh 5 2011-12-28 18:41:41Z leres $ (XSE)
+
+# The ARDUINO version should (a) be in an include file and
+# (b) should (at a minimum) be cpp friendly
+
+if [ $# -ne 1 ]; then
+ echo "usage: $0 version.txt" 1>&2
+ exit 1
+fi
+
+version="`cat $1`" || exit 1
+
+case "${version}" in
+
+0*)
+ echo "${version}"
+ ;;
+
+*)
+ echo "${version}" | /usr/bin/awk '{ print 100 * $0 }'
+ ;;
+esac