summaryrefslogtreecommitdiff
path: root/manualPorts/openttd-git/lastVersion.sh
diff options
context:
space:
mode:
Diffstat (limited to 'manualPorts/openttd-git/lastVersion.sh')
-rwxr-xr-xmanualPorts/openttd-git/lastVersion.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/manualPorts/openttd-git/lastVersion.sh b/manualPorts/openttd-git/lastVersion.sh
new file mode 100755
index 0000000..1f73eb7
--- /dev/null
+++ b/manualPorts/openttd-git/lastVersion.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+cd /usr/src/github/openttd
+git fetch --all -p >/dev/null 2>&1
+
+printf '%s.%s\n' \
+ "$((
+ $(git rev-list --first-parent --count upstream/master ^f84ad5f7c) + 28004
+ ))" \
+ "$(
+ git rev-parse --short upstream/master
+ )"
+