forked from I2P_Developers/i2p.i2p
I created this script for my own convenience. It isn't used by the Debian
packaging in any way. Now that I know about ant getBuildNumber, I'll just use that.
This commit is contained in:
25
debian/i2pversion
vendored
25
debian/i2pversion
vendored
@@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
ROUTER=$(/bin/echo -ne "_")$(cat ./router/java/src/net/i2p/router/RouterVersion.java | grep -e "public final static long BUILD" | cut -f2 -d"=" | cut -f1 -d";" | sed -re "s/ //g")
|
||||
if [ "$ROUTER" = "_" ] ; then
|
||||
ROUTER="_0"
|
||||
fi
|
||||
|
||||
#
|
||||
# That was the easy one, now for the tough one.
|
||||
#
|
||||
|
||||
CORE=$(cat core/java/src/net/i2p/CoreVersion.java | grep -e "public final static String VERSION" | cut -f2 -d'"' | sed -re "s/ //g")
|
||||
CORE1=$(/bin/echo -n $CORE.x.x | sed -re "s/(.*)\.(.*)\.(.*)\.(.*)/\1/")
|
||||
CORE2=$(/bin/echo -n $CORE.x | sed -re "s/(.*)\.(.*)\.(.*)\.(.*)/\1/")
|
||||
|
||||
if [ "$CORE.x.x" = "$CORE1" ] ; then
|
||||
CORE=$(/bin/echo -ne $CORE".0.0")
|
||||
fi
|
||||
if [ "$CORE.x" = "$CORE2" ] ; then
|
||||
CORE=$(/bin/echo -ne $CORE".0")
|
||||
fi
|
||||
|
||||
VERSION=$(/bin/echo $CORE$ROUTER)
|
||||
|
||||
echo $VERSION
|
Reference in New Issue
Block a user