mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-08 01:10:28 +00:00
(svn r21352) -Codechange: remove some unneeded code from config.lib
This commit is contained in:
parent
4aa6a24d95
commit
c0312e1011
75
config.lib
75
config.lib
@ -11,8 +11,6 @@ log() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_default() {
|
set_default() {
|
||||||
released_version=""
|
|
||||||
|
|
||||||
ignore_extra_parameters="0"
|
ignore_extra_parameters="0"
|
||||||
# We set all kinds of defaults for params. Later on the user can override
|
# We set all kinds of defaults for params. Later on the user can override
|
||||||
# most of them; but if they don't, this default is used.
|
# most of them; but if they don't, this default is used.
|
||||||
@ -990,51 +988,40 @@ check_params() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$released_version" ]; then
|
if [ -n "$revision" ]; then
|
||||||
log 1 "checking revision... release ($released_version)"
|
log 1 "checking revision... $revision"
|
||||||
if [ -n "$revision" ] && [ "$revision" != "$released_version" ]; then
|
log 1 "WARNING: we do not advise you to use this setting"
|
||||||
log 1 "WARNING: overriding of the revision is NOT possible for releases"
|
log 1 "WARNING: in most cases it is not safe for network use"
|
||||||
log 1 "WARNING: the given revision is IGNORED"
|
log 1 "WARNING: USE WITH CAUTION!"
|
||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
elif [ -f "$ROOT_DIR/version" ]; then
|
||||||
revision=$released_version
|
revision="`cat $ROOT_DIR/version`"
|
||||||
|
|
||||||
|
log 1 "checking revision... $revision"
|
||||||
|
elif [ -d "$ROOT_DIR/.svn" ] && [ -n "`svn help 2>/dev/null`" ]; then
|
||||||
|
revision=""
|
||||||
|
log 1 "checking revision... svn detection"
|
||||||
|
elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
|
||||||
|
revision=""
|
||||||
|
log 1 "checking revision... git detection"
|
||||||
|
elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`hg help 2>/dev/null`" ]; then
|
||||||
|
revision=""
|
||||||
|
log 1 "checking revision... hg detection"
|
||||||
|
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
|
||||||
|
revision=""
|
||||||
|
log 1 "checking revision... source tarball"
|
||||||
else
|
else
|
||||||
if [ -n "$revision" ]; then
|
revision=""
|
||||||
log 1 "checking revision... $revision"
|
log 1 "checking revision... no detection"
|
||||||
log 1 "WARNING: we do not advise you to use this setting"
|
log 1 "WARNING: there is no means to determine the version."
|
||||||
log 1 "WARNING: in most cases it is not safe for network use"
|
log 1 "WARNING: please use a subversion, mercurial, or git checkout of OpenTTD."
|
||||||
log 1 "WARNING: USE WITH CAUTION!"
|
log 1 "WARNING: you can only join game servers that have been compiled without"
|
||||||
|
log 1 "WARNING: version detection."
|
||||||
|
log 1 "WARNING: there is a great chance you desync."
|
||||||
|
log 1 "WARNING: USE WITH CAUTION!"
|
||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
elif [ -f "$ROOT_DIR/version" ]; then
|
|
||||||
revision="`cat $ROOT_DIR/version`"
|
|
||||||
|
|
||||||
log 1 "checking revision... $revision"
|
|
||||||
elif [ -d "$ROOT_DIR/.svn" ] && [ -n "`svn help 2>/dev/null`" ]; then
|
|
||||||
revision=""
|
|
||||||
log 1 "checking revision... svn detection"
|
|
||||||
elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
|
|
||||||
revision=""
|
|
||||||
log 1 "checking revision... git detection"
|
|
||||||
elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`hg help 2>/dev/null`" ]; then
|
|
||||||
revision=""
|
|
||||||
log 1 "checking revision... hg detection"
|
|
||||||
elif [ -f "$ROOT_DIR/.rev" ]; then
|
|
||||||
revision=""
|
|
||||||
log 1 "checking revision... source tarball"
|
|
||||||
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, mercurial, or git checkout of OpenTTD."
|
|
||||||
log 1 "WARNING: you can only join game servers that have been compiled without"
|
|
||||||
log 1 "WARNING: version detection."
|
|
||||||
log 1 "WARNING: there is a great chance you desync."
|
|
||||||
log 1 "WARNING: USE WITH CAUTION!"
|
|
||||||
|
|
||||||
sleep 5
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$doc_dir" = "1" ]; then
|
if [ "$doc_dir" = "1" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user