mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-18 01:09:16 +01:00
cc590e1ac8
*Uploaded the svnrev.c back online. It can stay on SVN there is nothing wrong with it :P.
21 lines
608 B
Bash
21 lines
608 B
Bash
#! /bin/sh
|
|
#
|
|
a=$(svnversion -n ..)
|
|
[ -n "$a" ] || a=$(SubWCRev .. | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/')
|
|
|
|
[ -f ../source/svnrev.c ] || touch ../source/svnrev.c
|
|
|
|
b=$(cat ../source/svnrev.c | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/')
|
|
|
|
if [ "$a" != "$b" ]; then
|
|
echo '#define SVN_REV "'$a'"' > ../source/svnrev.c
|
|
echo '' >> ../source/svnrev.c
|
|
echo 'const char *GetRev()' >> ../source/svnrev.c
|
|
echo '{ ' >> ../source/svnrev.c
|
|
echo ' return SVN_REV;' >> ../source/svnrev.c
|
|
echo '}' >> ../source/svnrev.c
|
|
echo '' >> ../source/svnrev.c
|
|
echo 'svnrev changed' >&2
|
|
fi
|
|
echo $a
|