From dec7875a6e23212021e4d9080330a42832dfe02a Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Tue, 15 Jun 2021 01:40:19 +0000
Subject: [PATCH] update SDL soruce to 2.0.14
---
source/build-scripts/showrev.sh | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/source/build-scripts/showrev.sh b/source/build-scripts/showrev.sh
index 517992d..d3b131a 100755
--- a/source/build-scripts/showrev.sh
+++ b/source/build-scripts/showrev.sh
@@ -2,4 +2,24 @@
#
# Print the current source revision, if available
-hg parents --template 'hg-{rev}:{node|short}' || (echo "hg-0:baadf00d"; exit 1)
+SDL_ROOT=$(dirname $0)/..
+cd $SDL_ROOT
+
+if [ -x "$(command -v hg)" ]; then
+ rev="$(hg parents --template 'hg-{rev}:{node|short}' 2>/dev/null)"
+ if [ $? = 0 ]; then
+ echo $rev
+ exit 0
+ fi
+fi
+
+if [ -x "$(command -v p4)" ]; then
+ rev="$(p4 changes -m1 ./...\#have 2>/dev/null| awk '{print $2}')"
+ if [ $? = 0 ]; then
+ echo $rev
+ exit 0
+ fi
+fi
+
+echo "hg-0:baadf00d"
+exit 1
--
Gitblit v1.9.3