diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2010-12-06 03:04:40 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-12-06 03:05:08 -0800 |
commit | 75896941dcc686055fe7ac8e6a86d54a69aac216 (patch) | |
tree | 283f5d45bc533be3df890796c6178a0aeec22b42 | |
parent | 470713ccba97fc9cd0620f11b3a2fd740792410f (diff) |
Allow ./version.sh on a specified commit-ish.
-rwxr-xr-x | version.sh | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 |