aboutsummaryrefslogtreecommitdiffstats
path: root/otp_build
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2009-12-02 16:35:32 +0100
committerBjörn Gustavsson <[email protected]>2010-01-12 08:35:29 +0100
commitfaac8129e160c133686e334a6b7e9497b6be1ed4 (patch)
tree1feccc1e1bced643990631eda3e0755d275845ba /otp_build
parent78fbf079c258f4ae55ec8f18f621c25ec4dd63c8 (diff)
downloadotp-faac8129e160c133686e334a6b7e9497b6be1ed4.tar.gz
otp-faac8129e160c133686e334a6b7e9497b6be1ed4.tar.bz2
otp-faac8129e160c133686e334a6b7e9497b6be1ed4.zip
Determine which VCS is being used
We want to add the ability for otp_build to determine which version control system (VCS) is being used, so that the commands for updating the primary bootstrap and pre-loaded modules can be updated to do different things depending on the VCS. In the beginning of the otp_build script, set the variable "version_controller" to either "none" (for no VCS), "git", or "clearcase".
Diffstat (limited to 'otp_build')
-rwxr-xr-xotp_build18
1 files changed, 18 insertions, 0 deletions
diff --git a/otp_build b/otp_build
index cddb477db5..07edcb1d4d 100755
--- a/otp_build
+++ b/otp_build
@@ -189,7 +189,23 @@ target_contains ()
return $?
}
+determine_version_controller ()
+{
+ version_controller=none
+ # The current directory is now $ERL_TOP. Check for
+ # either this directory being controlled by git or
+ # for the "otp_build" file being a Clearcase controlled
+ # object.
+
+ if git rev-parse --git-dir 2>/dev/null >/dev/null; then
+ version_controller=git
+ else
+ if test -d "otp_build@@/"; then
+ version_controller=clearcase
+ fi
+ fi
+}
# Execution of the different options
@@ -1144,6 +1160,8 @@ check_erltop
cd $ERL_TOP
+determine_version_controller
+
# Unset ERL_FLAGS and ERL_<Release>_FLAGS to prevent, for instance,
# a value of "-hybrid" to run the hybrid emulator during bootstrap.
sys_vsn=`awk '/SYSTEM_VSN = / {print $3}' < erts/vsn.mk`