Commit Graph

25 Commits (1ac19cb98107b6ead101efe1e6ae719a72542f03)

Author SHA1 Message Date
willthames e2d04f7e96 Allow hacking/env-setup module path to use config file library path
hacking/env-setup now adds the configured library path in ANSIBLE_CONFIG
to the ANSIBLE_LIBRARY environment variable in addition to the previous
default of ANSIBLE_HOME/library.

This replaces #5950.
11 years ago
Jens Rantil 2096c669d9 `env-setup` fix for zsh <= 4.3.10
This fixes issue #5026. It used to work. The regression was
introduced in 2b3381de7c.
11 years ago
phy1729 2b3381de7c Add zsh support for working dir independant sourcing 11 years ago
Michael DeHaan 955611bda8 Fixes #3294 12 years ago
Michael DeHaan 8b592c9d4b Add some whitespace to script 12 years ago
martin f. krafft 3839dcd56c Remove extra $ character
Signed-off-by: martin f. krafft <madduck@madduck.net>
12 years ago
martin f. krafft bbbc214ffb Remove bashisms, replace with POSIX constructs
This replaces double conditional brackets with single ones and gets ris
of bashisms, so that the tool should be sourcable from any POSIX shell.

Constructs like [ $foo = "$bar"* ] yield filesystem-globbing behaviour
according to POSIX. A compliant way is to use case statements.

Signed-off-by: martin f. krafft <madduck@madduck.net>
12 years ago
martin f. krafft 9f4988dbfd Quote variables in shell script
In case paths contain spaces, it's better to consistently quote
variables, and to use $() instead of `` for external invocations.

Signed-off-by: martin f. krafft <madduck@madduck.net>
12 years ago
martin f. krafft 4b9f8fc294 Replace external command with shell construct
dirname/basename do not need an external process, shell variable
expansion can be made to do the same a bit faster.

Signed-off-by: martin f. krafft <madduck@madduck.net>
12 years ago
martin f. krafft 013cd38929 Remove shebang line
The env-setup script is not intended to be run directly, so it does not
need a shebang line, which might even create the wrong expectations.

Signed-off-by: martin f. krafft <madduck@madduck.net>
12 years ago
martin f. krafft 3b008d6fa6 Expand usage synopsis
'source' is actually a "bashism" and the POSIX-way of sourcing a file
uses the single dot (which is arguably less readable). Both yield the
same result, and since the script may now also be sourced from
within the hacking directory, this commit expands the usage synopsis
accordingly.

Signed-off-by: martin f. krafft <madduck@madduck.net>

Conflicts:
	hacking/env-setup
12 years ago
martin f. krafft 581dea70d1 Generalise determination of hacking directory path
Bash needs a special case to determine the dirname of the sourced path
(the hacking dir), but in all other cases, using $0 allows the script to
be sourced also from within the hacking directory, not only from its
parent.

Signed-off-by: martin f. krafft <madduck@madduck.net>
12 years ago
Michael DeHaan 03db6ef24a Slightly more self-explanatory output for ./hacking/env-setup 12 years ago
Yves Dorfsman dfdc5bda4b Prevents PATH, PYTHONPATH etc... to be re-added. 12 years ago
junyoung a2aacaaec8 whitespaces in FULL_PATH cause an error to get ANSIBLE_PATH 12 years ago
Daniel Hokka Zakrisson a117944d0f Make env-setup work on Python 3 12 years ago
Blair Zajac ec5f6ae246 hacking/env-setup: remove unused sys import. 12 years ago
Will Thames 4d4d0b90c5 readlink -f does not work on OS X. Replaced with a python solution 12 years ago
willthames 6219fc4932 env-setup no longer needs to be run from the ansible directory, it can be run from anywhere
env-setup now takes a -q argument to run in quiet mode
12 years ago
Tim Bielawa e9e8417735 Update hacking with MANPATH. Correct hacking README details. 13 years ago
Michael DeHaan 82bd75c1e0 Update env-setup script to make it work better 13 years ago
Michael DeHaan 85e0de5bb2 Move print statements out of playbook.py and back into CLI so we can simplify playbook operations
independent of output, and can also see all the output nicely grouped together if we want
to reformat it or make summaries of statistics.
13 years ago
Tim Bielawa c5f8bc9d79 Don't set ANSIBLE_HOSTS inside the env-setup script 13 years ago
Tim Bielawa f2c2786a14 Update constants.py to pull module path and the hosts file from the
environment (ANSIBLE_{LIBRARY,HOSTS}) if defined.

Update manpages to represent this.

Also update the env-setup script to set ANSIBLE_{LIBRARY,HOSTS}.
13 years ago
Tim Bielawa 6343aa6214 Add environment updating script 'env-setup' to facilitate running ansible from a git checkout. 13 years ago