Ian Jackson | 95a2928 | 2015-09-09 23:30:16 +0000 | [diff] [blame] | 1 | #!/bin/sh -e |
Gordon Henderson | 7cb8174 | 2015-01-31 16:43:08 +0000 | [diff] [blame] | 2 | # |
| 3 | # newVersion: |
| 4 | # Utility to create the version.h include file for the gpio command. |
Gordon Henderson | 170dce5 | 2015-09-20 19:30:38 +0100 | [diff] [blame] | 5 | # and the Debian package |
Gordon Henderson | 7cb8174 | 2015-01-31 16:43:08 +0000 | [diff] [blame] | 6 | # |
| 7 | # Copyright (c) 2012-2015 Gordon Henderson |
| 8 | ################################################################################# |
| 9 | # This file is part of wiringPi: |
Gordon Henderson | b1dfc18 | 2016-12-12 14:19:55 +0000 | [diff] [blame] | 10 | # A "wiring" library for the Raspberry Pi |
Gordon Henderson | 7cb8174 | 2015-01-31 16:43:08 +0000 | [diff] [blame] | 11 | # |
| 12 | # wiringPi is free software: you can redistribute it and/or modify |
| 13 | # it under the terms of the GNU Lesser General Public License as published by |
| 14 | # the Free Software Foundation, either version 3 of the License, or |
| 15 | # (at your option) any later version. |
| 16 | # |
| 17 | # wiringPi is distributed in the hope that it will be useful, |
| 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | # GNU Lesser General Public License for more details. |
| 21 | # |
| 22 | # You should have received a copy of the GNU Lesser General Public License |
| 23 | # along with wiringPi. If not, see <http://www.gnu.org/licenses/>. |
| 24 | ################################################################################# |
| 25 | |
Gordon Henderson | 170dce5 | 2015-09-20 19:30:38 +0100 | [diff] [blame] | 26 | echo Updating to version: `cat VERSION` |
| 27 | |
Gordon Henderson | e687f3f | 2017-01-24 12:13:39 +0000 | [diff] [blame] | 28 | rm -f version.h |
| 29 | vMaj=`cut -d. -f1 VERSION` |
| 30 | vMin=`cut -d. -f2 VERSION` |
| 31 | echo "#define VERSION \"`cat VERSION`\"" > version.h |
| 32 | echo "#define VERSION_MAJOR $vMaj" >> version.h |
Deokgyu Yang | 9a27ae8 | 2020-04-17 16:53:35 +0900 | [diff] [blame] | 33 | echo "#define VERSION_MINOR \"$vMin\"" >> version.h |