ForgePatch/forge/inject_version.sh
LexManos 08195cfc03 Streamlined the Setup, Build and Package scripts:
On windows they no longer need the user to press enter every step
Moved version info out to version.txt, This will only effect the svn. If you update the version do it in version.txt not in ForgeHooks.java.
Introduced the build number into the version string.
Cleaned up some extra echos in scripts.
2012-01-25 07:00:31 +00:00

14 lines
No EOL
368 B
Bash

#!/bin/bash
target=$1
read major minor rev build <version.txt
echo Injecting Revision $major.$minor.$rev.$build $target
sed s/majorVersion=0/majorVersion=$major/ <$target | \
sed s/minorVersion=0/minorVersion=$minor/ | \
sed s/revisionVersion=0/revisionVersion=$rev/ | \
sed s/buildVersion=0/buildVersion=$build/ | \
tr -d '\r' > $target.tmp
mv $target.tmp $target