Commit Graph

69 Commits (415e08c2970757472314e515cb63a51ad825c45e)

Author SHA1 Message Date
Vincent Bernat 4afc228108
hacking: replace use of "which" with "command -v" (#71278)
"command -v" is the POSIX compliant way to get the path to a command.
It returns the path to the command if it exists and exits with a
non-zero status when it does not, without any output. "which" is not
POSIX and it can have various different effects. With Zsh, it says
"python not found" on stdout.

See:
 - https://pubs.opengroup.org/onlinepubs/009695399/utilities/command.html

Signed-off-by: Vincent Bernat <vincent@bernat.ch>
4 years ago
Matt Clay 7323d5dd0d Fix references to old egg-info directory. 5 years ago
Matt Clay f3d1f9544b
Make ansible-test available in the bin directory. (#45876) 6 years ago
Michael Scherer 83db157c35 Add a default man path (#45689)
It seems that on some Linux distribution (Fedora 28, Debian), man will
not fallback on a default path if MANPATH is set. So using the env-setup
script will prevent man from working.
6 years ago
Matt Clay 0392dbeba1 Fix path handling in hacking/env-setup. 6 years ago
Troy Murray 15ce7c5bab change OS X to macOS (#41294)
* change OS X to macOS

<!--- Your description here -->

+label: docsite_pr

* Update all Mac OS X references to be macOS

* Drop extra Mac
6 years ago
Matt Martz 8e523089ef Speed up env-setup (#24133) 8 years ago
Matt Clay 48e82b4ca8 Add `test/runner` to $PATH in `hacking/env-setup`. (#22387) 8 years ago
Michael Scherer 619f3d13ef Add detection of python3 to hacking/env-setup (#17357)
People can still override the detection using PYTHON_BIN
8 years ago
Josh Smift 81d7e132f9 force deletion of .pyc files (#17109) 8 years ago
Matt Davis 525c0469d2 tweak hacking/env-setup to work under ash (#17054) 8 years ago
Patrik Lundin 9f9944e355 Replace -delete with portable -exec rm {} \;
Needed on OpenBSD which does not support -delete.
9 years ago
Brian Coca 4a206cdde9 force egg deletion 9 years ago
James Cammarata a431121f9f Tweak to hacking path fix to go back to subshell use 9 years ago
EC bcdb4e78ae Allow env-setup to use spaces in full path 9 years ago
Luke Rohde cba4642d8d Use find ... -delete instead of non-portable globbing 9 years ago
Luke Rohde 647e48f776 Delete all compiled python files when running hacking/env-setup 9 years ago
Jody Frankowski bc1e1d2cdc Fix rm call in hacking/env-setup. Since it is sourced from a user shell,
rm can have an alias to 'rm -i', which will make sourcing hang when '-q'
is enabled.
9 years ago
Abhijit Menon-Sen 114070c226 Add missing $ 9 years ago
bryan hunt 7a76fcb159 merged 9 years ago
Sheldon Hearn c800a1c68a Preserve OLDPWD 9 years ago
Matt Martz 104b2036f7 egg_info is now written directly to lib 10 years ago
Toshio Kuratomi caf2a96ef9 Merge pdksh fix to v2 10 years ago
Patrik Lundin 731b268cd6 env-setup: Don't use ${.sh.file} if shell is pdksh
The default ksh in OpenBSD throws the following error:
===
$ . hacking/env-setup
ksh: hacking/env-setup[23]: ${.sh.file}": bad substitution
[...]
===

The same error can be seen on Linux if pdksh is used.
10 years ago
Toshio Kuratomi 7c86db3187 Add KSH compat
cherry picked from https://github.com/ansible/ansible/pull/6899
10 years ago
rpe-github 0a73067153 Use basename -- $0 in case $0 starts with a dash.
For example, pdksh $0 contains '-ksh'.
10 years ago
Marco Ippolito 23da2f6415 Redundant file descriptor specifier 10 years ago
Marco Ippolito 4cd5be396d BUG! Incorrect order of redirection AND incorrect redirection syntax
The replaced code only created a text file called `1' in the
current directory, it did *not* redirect output.
10 years ago
Marco Ippolito bc0f0f838e More elegant output using here-document syntax
POSIX section 2.7.4 defines here-documents.
10 years ago
Marco Ippolito 7eb278e797 Identified two verbosity levels: info, silent
Conflicts:
	hacking/env-setup
10 years ago
Marco Ippolito 9bc1e1a4a0 Reserve capitalised identifiers for system variables
Conflicts:
	hacking/env-setup
10 years ago
Marco Ippolito 53fadd371b No need to prepend `.' to a relative path 10 years ago
Toshio Kuratomi 566a8d1b9d Fix issue with mixing quoting and glo9bbing. 10 years ago
Toshio Kuratomi 365af69c3e More quotes and reimplement without pushd/popd 10 years ago
Toshio Kuratomi dde32a826f Set default values for shell variables that we use
Fixes #9991
10 years ago
Toshio Kuratomi 09e556e9a4 Get rid of bash compound command to make more portable 10 years ago
Toshio Kuratomi 245f934629 Remove shebang and execute perms for env-setup since it must be sourced 10 years ago
Marco Ippolito b688570380 Corrected quoting of parameter expansions in hacking/env-setup
Conflicts:
	hacking/env-setup
10 years ago
Marco Ippolito b8921706f8 Prefer modern-style Bash command substitution in hacking/env-setup
Conflicts:
	hacking/env-setup
10 years ago
Marco Ippolito 31c8523371 Updated shebang from #!/bin/bash to #!/usr/bin/env bash (more flexible) 10 years ago
Brian Coca 88443d6dcf Merge pull request #7306 from abadger/feature/egg-info
Feature/egg info
10 years ago
Bryan Hunt e5f651c458 export ANSIBLE_HOME so it can be used in scripts
In order that scripts like this can work 
```
#!/bin/bash
ansible -vvvv tag_instance_type_foo-training -i "${ANSIBLE_HOME}/plugins/inventory/ec2.py" --private-key=~/Downloads/foo-training.pem -u ec2-user -m ping
```
10 years ago
Michael DeHaan 7f6ab89b5b hacking/env-setup no longer needs to set library since modules appear as git submodules. 10 years ago
Toshio Kuratomi 6a6060ac55 Teach env-setup how to create egg-info for ansible so that pkg_resources works 11 years ago
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