summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-23 17:05:15 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-07 02:41:11 -0800
commit6348721de3e4baa701f117ba60534a9d8732705c (patch)
tree21fc62059a79acbb59a543edb760a35ff685ccac
parentf549c55a34cd82d7e00cb4c9480dd79e38687f71 (diff)
Minor code refactor of version.sh (unneccessary).
-rwxr-xr-xversion.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/version.sh b/version.sh
index 7fcf151..3d2ce58 100755
--- a/version.sh
+++ b/version.sh
@@ -6,6 +6,10 @@ else
flags=("$@")
fi
-echo -n "$(git describe --tags --match="v*" "${flags[@]}" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@@')"
-grep '#define ForRelease 0' MobileCydia.mm &>/dev/null && echo -n '~srk'
-echo
+version=$(git describe --tags --match="v*" "${flags[@]}" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@@')
+
+if grep '#define ForRelease 0' MobileCydia.mm &>/dev/null; then
+ version=${version}~srk
+fi
+
+echo "${version}"