X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/991d7f6c5637f27563b2e0bc9d8cb9397126b5f4..bcde1e7004f2ebaa757a1fd9109211d57dcccbc7:/version.sh?ds=sidebyside diff --git a/version.sh b/version.sh index 1e204f31..7fcf1515 100755 --- a/version.sh +++ b/version.sh @@ -1,4 +1,11 @@ #!/bin/bash -echo -n "$(git describe --tags --dirty="+" --match="v*" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@@')" + +if [[ $# -eq 0 ]]; then + flags=(--dirty="+") +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