summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-07 00:25:49 +0000
committerrubidium <rubidium@openttd.org>2007-06-07 00:25:49 +0000
commit463093d0aef194ff6e3adc731742880ca890e608 (patch)
tree9c9fcbcbc24b1e829ed158b771e578307a727b91 /config.lib
parent94b2dc3f8a5a22046013c0a84b9525de53c5f119 (diff)
downloadopenttd-463093d0aef194ff6e3adc731742880ca890e608.tar.xz
(svn r10051) -Add: git "version" detection so we've got at least some indication what version we're playing when using git ;)
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib15
1 files changed, 14 insertions, 1 deletions
diff --git a/config.lib b/config.lib
index ec3df61c3..6cd58c7b0 100644
--- a/config.lib
+++ b/config.lib
@@ -633,10 +633,23 @@ check_params() {
revision="`cat $ROOT_DIR/version`"
log 1 "checking revision... $revision"
+ elif [ -d "$ROOT_DIR/.svn" ] && [ -n "`svn help`" ]; then
+ revision=""
+ log 1 "checking revision... svn detection"
+ elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help`" ]; then
+ revision=""
+ log 1 "checking revision... git detection"
else
revision=""
+ log 1 "checking revision... no detection"
+ log 1 "WARNING: there is no means to determine the version."
+ log 1 "WARNING: please use a subversion or git checkout of OpenTTD."
+ log 1 "WARNING: this version will be allowed by all game servers,"
+ log 1 "WARNING: but you will be kicked from all incompatible"
+ log 1 "WARNING: servers as you will desync."
+ log 1 "WARNING: USE WITH CAUTION!"
- log 1 "checking revision... svn detection"
+ sleep 5
fi
fi
}