From 6343aa62141607b2b7f4b8990832af5fa8e5fb22 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Mon, 5 Mar 2012 13:47:01 -0500 Subject: [PATCH] Add environment updating script 'env-setup' to facilitate running ansible from a git checkout. --- .gitignore | 4 +++- docs/man/.gitignore | 3 ++- hacking/README | 11 +++++++++++ hacking/env-setup | 11 +++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 hacking/README create mode 100755 hacking/env-setup diff --git a/.gitignore b/.gitignore index d1a7b1604b1..ff4333a6b3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ -*~ *.py[co] build +# Emacs backup files... +*~ +.\#* diff --git a/docs/man/.gitignore b/docs/man/.gitignore index b81c7954b78..7c0aaeb5e42 100644 --- a/docs/man/.gitignore +++ b/docs/man/.gitignore @@ -1 +1,2 @@ -*.xml \ No newline at end of file +*.xml +*.[0-9] diff --git a/hacking/README b/hacking/README new file mode 100644 index 00000000000..dd7abbd4fed --- /dev/null +++ b/hacking/README @@ -0,0 +1,11 @@ +The 'env-setup' script modifies your environment to allow you to run +ansible from a git checkout. + +To use it from the root of a checkout: + + $ . ./hacking/env-setup + +Note the space between the '.' and the './' + +Man pages will not load until you run 'make docs' from the root of the +checkout. diff --git a/hacking/env-setup b/hacking/env-setup new file mode 100755 index 00000000000..1f4af4e1a26 --- /dev/null +++ b/hacking/env-setup @@ -0,0 +1,11 @@ +# -*- mode: shell-script -*- +PREFIX_PYTHONPATH="`pwd`/lib/ansible:`pwd`/lib" +PREFIX_PATH="`pwd`/bin" +PREFIX_MANPATH="`pwd`/docs/man" + +echo "Prefixing PYTHONPATH with $PREFIX_PYTHONPATH" +export PYTHONPATH=$PREFIX_PYTHONPATH:$PYTHONPATH +echo "Prefixing PATH with $PREFIX_PATH" +export PATH=$PREFIX_PATH:$PATH +echo "Prefixing MANPATH with $PREFIX_MANPATH" +export MANPATH=$PREFIX_MANPATH:$MANPATH