3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 # Usage: genversion.sh destination-dir path-to-version.sh [source-root]
11 # Generate version.h file
13 # XXX DO NOT TWEAK VERSION HERE, EDIT version.sh INSTEAD
17 cat > "$1/_version.h" << EOF
18 /* Generated by genversion.sh */
19 extern const char rbversion[];
20 #define RBVERSION "$VERSION"
23 if [ -f "$1/version.h" ]
24 then if diff "$1/_version.h" "$1/version.h" > /dev
/null
25 then rm -f "$1/_version.h"
26 else mv "$1/_version.h" "$1/version.h"
28 else mv "$1/_version.h" "$1/version.h"