From: Tobias Ulmer Date: Wed, 1 Aug 2012 14:13:07 +0000 (+0200) Subject: Get rid of the duplicate e2-locate-project-root tool X-Git-Tag: e2factory-2.3.13rc1~221 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=3950490cdfeac00a447bff70cfe3fd57c47e5849;p=e2factory.git Get rid of the duplicate e2-locate-project-root tool It is required during make local, at which point we have a global installation and can therefore use the global tool. Signed-off-by: Tobias Ulmer --- diff --git a/Makefile b/Makefile index d14021e..d0f7e8c 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ local: e2commit buildconfig.lua $(MAKE) -C extensions local install-local: - scripts/e2-locate-project-root + $(BINDIR)/e2-locate-project-root @echo removing old installation... rm -rf $(LOCALBINDIR) rm -rf $(LOCALLIBDIR) diff --git a/global/e2-install-e2.lua.in b/global/e2-install-e2.lua.in index 54f66d5..6e14f6c 100755 --- a/global/e2-install-e2.lua.in +++ b/global/e2-install-e2.lua.in @@ -30,8 +30,6 @@ require("e2lib") require("e2option") require("generic_git") -install_prefix = buildconfig.PREFIX - e2lib.init() e2option.documentation = [[ @@ -199,8 +197,8 @@ rc, re = e2lib.chdir(root .. "/.e2/e2") if not rc then e2lib.abort(e:cat(re)) end -local cmd = string.format("make PREFIX=%s local install-local", - e2lib.shquote(install_prefix)) +local cmd = string.format("make PREFIX=%s BINDIR=%s local install-local", + e2lib.shquote(buildconfig.PREFIX), e2lib.shquote(buildconfig.BINDIR)) rc, re = e2lib.callcmd_capture(cmd) if rc ~= 0 then e2lib.abort(e:cat(re)) diff --git a/make.vars b/make.vars index f03894e..795b779 100644 --- a/make.vars +++ b/make.vars @@ -38,7 +38,7 @@ export DEFAULT_LOCAL_BRANCH DEFAULT_LOCAL_TAG DETECT_TOOL = $(TOPLEVEL)/scripts/detect_tool -PROJECTDIR ?= $(shell cd $(TOPLEVEL);scripts/e2-locate-project-root 2>/dev/null) +PROJECTDIR ?= $(shell cd $(TOPLEVEL) && $(BINDIR)/e2-locate-project-root 2>/dev/null) E2DATA = /mnt/e2data export E2DATA PROJECTDIR diff --git a/scripts/e2-locate-project-root b/scripts/e2-locate-project-root deleted file mode 100755 index 5606c3d..0000000 --- a/scripts/e2-locate-project-root +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -export LC_ALL=C -while [ '!' -d .e2 ] ; do - if [ "$PWD" = "/" ] ; then - echo >&2 \ - "e2-locate-project-root: Not in a project environment." - exit 1 - fi - cd .. -done -echo $PWD