blob: 34c798d2563fbcece79054e25c346f6ff37da0b2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh
# @(#) $Id: version.sh 22 2012-08-05 06:24:24Z 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/sed -e 's/\.//g'
;;
*.*)
echo "${version}" | /usr/bin/awk '{ print 100 * $0 }'
;;
*)
echo "${version}"
;;
esac
|