Mercurial > hg
comparison Makefile @ 31142:408dcf7475a7
osx: install bash and zsh completions by default
The zsh location appears to be on the default $fpath for zsh. bash, on
the other hand, appears to have no default location for completion
scripts, so we follow the lead of Apple's Git distribution and select
a semi-arbitrary place in /usr/local for the file.
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 06 Feb 2017 15:19:32 -0500 |
parents | e4492d55fb66 |
children | 8e516f71577a |
comparison
equal
deleted
inserted
replaced
31141:b4cd912d7704 | 31142:408dcf7475a7 |
---|---|
161 osx: | 161 osx: |
162 /usr/bin/python2.7 setup.py install --optimize=1 \ | 162 /usr/bin/python2.7 setup.py install --optimize=1 \ |
163 --root=build/mercurial/ --prefix=/usr/local/ \ | 163 --root=build/mercurial/ --prefix=/usr/local/ \ |
164 --install-lib=/Library/Python/2.7/site-packages/ | 164 --install-lib=/Library/Python/2.7/site-packages/ |
165 make -C doc all install DESTDIR="$(PWD)/build/mercurial/" | 165 make -C doc all install DESTDIR="$(PWD)/build/mercurial/" |
166 # install zsh completions - this location appears to be | |
167 # searched by default as of macOS Sierra. | |
168 mkdir -p build/mercurial/usr/local/share/zsh/site-functions | |
169 cp contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/hg | |
170 # install bash completions - there doesn't appear to be a | |
171 # place that's searched by default for bash, so we'll follow | |
172 # the lead of Apple's git install and just put it in a | |
173 # location of our own. | |
174 mkdir -p build/mercurial/usr/local/hg/contrib | |
175 cp contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash | |
166 mkdir -p $${OUTPUTDIR:-dist} | 176 mkdir -p $${OUTPUTDIR:-dist} |
167 HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \ | 177 HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \ |
168 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \ | 178 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \ |
169 pkgbuild --root build/mercurial/ \ | 179 pkgbuild --root build/mercurial/ \ |
170 --identifier org.mercurial-scm.mercurial \ | 180 --identifier org.mercurial-scm.mercurial \ |