I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit c90ac9ee authored by kytv's avatar kytv
Browse files

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.
parent 67d608a1
No related branches found
No related tags found
No related merge requests found
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment