mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 12:57:53 +00:00
When installing SVN snapshots, include the branch and revision in the version number.
In case some random snapshot is installed and used for production, then this will ease rewinding.
This commit is contained in:
parent
20eeb8e122
commit
efa83fdf6e
@ -101,10 +101,10 @@ install-lib-main: install-local-test $(LIBDIR)
|
||||
tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
|
||||
done
|
||||
@rm -f $(LIBDIR)/tools/addToolVersion.sh
|
||||
@for src_file in steps.mk .version; do \
|
||||
echo " INST $${src_file}"; \
|
||||
install -m 644 $${src_file} $(LIBDIR)/$${src_file}; \
|
||||
done
|
||||
@echo " INST steps.mk"
|
||||
@install -m 644 steps.mk $(LIBDIR)/steps.mk
|
||||
@echo " INST .version"
|
||||
@echo "$(VERSION)" >$(LIBDIR)/.version
|
||||
|
||||
# Samples need a little love:
|
||||
# - change every occurrence of CT_TOP_DIR to CT_LIB_DIR
|
||||
|
15
configure
vendored
15
configure
vendored
@ -121,6 +121,21 @@ fi
|
||||
#---------------------------------------------------------------------
|
||||
# Some sanity checks, now
|
||||
|
||||
# If this version is a svn snapshot, try to get the revision number
|
||||
# If we can't get the revision number, use date
|
||||
case "${VERSION}" in
|
||||
*+svn)
|
||||
REVISION=$(LANG=C svn info 2>/dev/null |egrep 'Revision: ' |cut -d ' ' -f 2-)
|
||||
if [ -n "${REVISION}" ]; then
|
||||
URL=$(LANG=C svn info 2>/dev/null |egrep 'URL: ' |cut -d ' ' -f 2-)
|
||||
ROOT=$(LANG=C svn info 2>/dev/null |egrep 'Repository Root: ' |cut -d ' ' -f 3-)
|
||||
VERSION="${VERSION}:${URL#${ROOT}}@${REVISION}"
|
||||
else
|
||||
VERSION="${VERSION}:unknown@$(date +%Y%m%d.%H%M%S)"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check bash is present, and at least version 3.0
|
||||
[ -x /bin/bash ] || do_error "bash 3.0 or above was not found in /bin/bash"
|
||||
bash_version=$(/bin/bash -c 'echo ${BASH_VERSION}')
|
||||
|
Loading…
Reference in New Issue
Block a user