0392dbeba1
Fix path handling in hacking/env-setup.
2018-08-10 23:36:56 -07:00
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
2018-06-26 14:09:23 -04:00
8e523089ef
Speed up env-setup ( #24133 )
2017-05-01 09:54:50 -05:00
48e82b4ca8
Add test/runner to $PATH in hacking/env-setup. ( #22387 )
2017-03-07 16:31:53 -08:00
619f3d13ef
Add detection of python3 to hacking/env-setup ( #17357 )
...
People can still override the detection using PYTHON_BIN
2016-09-02 12:11:38 -07:00
81d7e132f9
force deletion of .pyc files ( #17109 )
2016-08-17 00:43:10 +02:00
525c0469d2
tweak hacking/env-setup to work under ash ( #17054 )
2016-08-11 16:58:08 -07:00
9f9944e355
Replace -delete with portable -exec rm {} \;
...
Needed on OpenBSD which does not support -delete.
2015-12-02 11:06:09 +01:00
4a206cdde9
force egg deletion
2015-11-02 11:58:20 -05:00
a431121f9f
Tweak to hacking path fix to go back to subshell use
2015-09-17 15:26:45 -04:00
bcdb4e78ae
Allow env-setup to use spaces in full path
2015-09-17 15:11:25 -04:00
cba4642d8d
Use find ... -delete instead of non-portable globbing
2015-09-02 17:05:16 -04:00
647e48f776
Delete all compiled python files when running hacking/env-setup
2015-09-02 14:49:02 -04:00
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.
2015-08-15 00:43:45 +02:00
114070c226
Add missing $
2015-08-07 09:41:29 +05:30
7a76fcb159
merged
2015-07-27 11:57:58 +01:00
c800a1c68a
Preserve OLDPWD
2015-07-23 11:24:30 +02:00
104b2036f7
egg_info is now written directly to lib
2015-03-27 12:03:20 -05:00
caf2a96ef9
Merge pdksh fix to v2
2015-03-15 13:22:07 -07:00
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.
2015-03-15 10:46:21 +01:00
7c86db3187
Add KSH compat
...
cherry picked from https://github.com/ansible/ansible/pull/6899
2015-02-09 15:37:35 -08:00
0a73067153
Use basename -- $0 in case $0 starts with a dash.
...
For example, pdksh $0 contains '-ksh'.
2015-01-25 23:13:54 +01:00
23da2f6415
Redundant file descriptor specifier
2015-01-19 09:03:15 -08:00
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.
2015-01-19 09:03:15 -08:00
bc0f0f838e
More elegant output using here-document syntax
...
POSIX section 2.7.4 defines here-documents.
2015-01-19 09:03:15 -08:00
7eb278e797
Identified two verbosity levels: info, silent
...
Conflicts:
hacking/env-setup
2015-01-19 09:03:15 -08:00
9bc1e1a4a0
Reserve capitalised identifiers for system variables
...
Conflicts:
hacking/env-setup
2015-01-19 09:03:15 -08:00
53fadd371b
No need to prepend `.' to a relative path
2015-01-19 09:03:14 -08:00
566a8d1b9d
Fix issue with mixing quoting and glo9bbing.
2015-01-18 10:29:07 -08:00
365af69c3e
More quotes and reimplement without pushd/popd
2015-01-18 08:17:37 -08:00
dde32a826f
Set default values for shell variables that we use
...
Fixes #9991
2015-01-15 11:08:00 -08:00
09e556e9a4
Get rid of bash compound command to make more portable
2015-01-13 11:38:06 -08:00
245f934629
Remove shebang and execute perms for env-setup since it must be sourced
2015-01-12 08:03:53 -08:00
b688570380
Corrected quoting of parameter expansions in hacking/env-setup
...
Conflicts:
hacking/env-setup
2015-01-10 17:29:56 -08:00
b8921706f8
Prefer modern-style Bash command substitution in hacking/env-setup
...
Conflicts:
hacking/env-setup
2015-01-10 17:26:19 -08:00
31c8523371
Updated shebang from #!/bin/bash to #!/usr/bin/env bash (more flexible)
2015-01-10 17:21:43 -08:00
88443d6dcf
Merge pull request #7306 from abadger/feature/egg-info
...
Feature/egg info
2014-12-15 16:26:37 -05:00
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
```
2014-10-28 20:19:15 +00:00
7f6ab89b5b
hacking/env-setup no longer needs to set library since modules appear as git submodules.
2014-09-26 17:59:46 -04:00
6a6060ac55
Teach env-setup how to create egg-info for ansible so that pkg_resources works
2014-05-06 11:19:41 -07:00
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 .
2014-02-12 12:06:57 +10:00
2096c669d9
env-setup fix for zsh <= 4.3.10
...
This fixes issue #5026 . It used to work. The regression was
introduced in 2b3381de7c .
2013-12-04 14:36:47 +01:00
2b3381de7c
Add zsh support for working dir independant sourcing
2013-11-19 13:35:01 -06:00
955611bda8
Fixes #3294
2013-06-30 19:59:48 -04:00
8b592c9d4b
Add some whitespace to script
2013-06-30 19:21:28 -04:00
3839dcd56c
Remove extra $ character
...
Signed-off-by: martin f. krafft <madduck@madduck.net >
2013-06-23 14:58:09 +02:00
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 >
2013-06-20 08:18:37 +02:00
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 >
2013-06-20 08:18:37 +02:00
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 >
2013-06-20 08:18:11 +02:00
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 >
2013-06-20 08:18:11 +02:00