Move all dashed-form commands to libexecdir
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Nov 28, 2007 at 23:21 UTC
f28ac70f48aa36f0d6ea1cbaa967b56802549016
4 files changed
+23
-8
Makefile
+2
-1
@@ -174,7 +174,7 @@ prefix = $(HOME)
174
bindir = $(prefix)/bin
175
mandir = $(prefix)/share/man
176
infodir = $(prefix)/share/info
177
-gitexecdir = $(bindir)
177
+gitexecdir = $(prefix)/libexec/git-core
178
sharedir = $(prefix)/share
179
template_dir = $(sharedir)/git-core/templates
180
htmldir=$(sharedir)/doc/git-doc
@@ -1286,6 +1286,7 @@ endif
1286
ifneq (,$X)
1287
$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)
1288
endif
1289
+ ./check_bindir 'z$(bindir_SQ)' 'z$(gitexecdir_SQ)' '$(DESTDIR_SQ)$(bindir_SQ)/git-shell$X'
1290
1291
install-doc:
1292
$(MAKE) -C Documentation install
check_bindir
new
+13
@@ -0,0 +1,13 @@
1
+#!/bin/sh
2
+bindir="$1"
3
+gitexecdir="$2"
4
+gitcmd="$3"
5
+if test "$bindir" != "$gitexecdir" -a -x "$gitcmd"
6
+then
7
+ echo
8
+ echo "!! You have installed git-* commands to new gitexecdir."
9
+ echo "!! Old version git-* commands still remain in bindir."
10
+ echo "!! Mixing two versions of Git will lead to problems."
11
+ echo "!! Please remove old version commands in bindir now."
12
+ echo
13
+fi
config.mak.in
+1
-1
@@ -11,7 +11,7 @@ TCLTK_PATH = @TCLTK_PATH@
11
prefix = @prefix@
12
exec_prefix = @exec_prefix@
13
bindir = @bindir@
14
-#gitexecdir = @libexecdir@/git-core/
14
+gitexecdir = @libexecdir@/git-core/
15
datarootdir = @datarootdir@
16
template_dir = @datadir@/git-core/templates/
17
git.spec.in
+7
-6
@@ -117,6 +117,7 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
117
find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';'
118
119
(find $RPM_BUILD_ROOT%{_bindir} -type f | grep -vE "archimport|svn|cvs|email|gitk|git-gui|git-citool" | sed -e s@^$RPM_BUILD_ROOT@@) > bin-man-doc-files
120
+(find $RPM_BUILD_ROOT%{_libexecdir}/git-core -type f | grep -vE "archimport|svn|cvs|email|gitk|git-gui|git-citool" | sed -e s@^$RPM_BUILD_ROOT@@) >> bin-man-doc-files
121
(find $RPM_BUILD_ROOT%{perl_vendorlib} -type f | sed -e s@^$RPM_BUILD_ROOT@@) >> perl-files
122
%if %{!?_without_docs:1}0
123
(find $RPM_BUILD_ROOT%{_mandir} $RPM_BUILD_ROOT/Documentation -type f | grep -vE "archimport|svn|git-cvs|email|gitk|git-gui|git-citool" | sed -e s@^$RPM_BUILD_ROOT@@ -e 's/$/*/' ) >> bin-man-doc-files
@@ -136,7 +137,7 @@ rm -rf $RPM_BUILD_ROOT
137
138
%files svn
139
%defattr(-,root,root)
139
-%{_bindir}/*svn*
140
+%{_libexecdir}/git-core/*svn*
141
%doc Documentation/*svn*.txt
142
%{!?_without_docs: %{_mandir}/man1/*svn*.1*}
143
%{!?_without_docs: %doc Documentation/*svn*.html }
@@ -144,28 +145,28 @@ rm -rf $RPM_BUILD_ROOT
145
%files cvs
146
%defattr(-,root,root)
147
%doc Documentation/*git-cvs*.txt
147
-%{_bindir}/*cvs*
148
+%{_libexecdir}/git-core/*cvs*
149
%{!?_without_docs: %{_mandir}/man1/*cvs*.1*}
150
%{!?_without_docs: %doc Documentation/*git-cvs*.html }
151
152
%files arch
153
%defattr(-,root,root)
154
%doc Documentation/git-archimport.txt
154
-%{_bindir}/git-archimport
155
+%{_libexecdir}/git-core/git-archimport
156
%{!?_without_docs: %{_mandir}/man1/git-archimport.1*}
157
%{!?_without_docs: %doc Documentation/git-archimport.html }
158
159
%files email
160
%defattr(-,root,root)
161
%doc Documentation/*email*.txt
161
-%{_bindir}/*email*
162
+%{_libexecdir}/git-core/*email*
163
%{!?_without_docs: %{_mandir}/man1/*email*.1*}
164
%{!?_without_docs: %doc Documentation/*email*.html }
165
166
%files gui
167
%defattr(-,root,root)
167
-%{_bindir}/git-gui
168
-%{_bindir}/git-citool
168
+%{_libexecdir}/git-core/git-gui
169
+%{_libexecdir}/git-core/git-citool
170
%{_datadir}/git-gui/
171
%{!?_without_docs: %{_mandir}/man1/git-gui.1*}
172
%{!?_without_docs: %doc Documentation/git-gui.html}