Commit b1315eb7 by Ned Batchelder Committed by GitHub

Merge pull request #3570 from edx/ned/bashrc.d

Use a .bashrc.d directory for more flexible configuration
parents c6a96575 fced48c7
......@@ -72,11 +72,21 @@
line: ". {{ localdev_home }}/share_x11"
state: present
# Create a .bashrc.d directory to hold extra bash initializations
- name: Create .bashrc.d dir
file:
path: "{{ item.home }}/.bashrc.d"
owner: "{{ item.user }}"
group: "{{ common_web_group }}"
state: directory
with_items: "{{ localdev_accounts }}"
when: item.user != 'None'
# Create scripts to add paver autocomplete
- name: Add paver autocomplete
copy:
src: paver_autocomplete
dest: "{{ item.home }}/.paver_autocomplete"
src: paver_autocomplete.sh
dest: "{{ item.home }}/.bashrc.d/paver_autocomplete.sh"
owner: "{{ item.user }}"
group: "{{ common_web_group }}"
mode: "0755"
......
......@@ -28,8 +28,13 @@ else
export DISPLAY="{{ localdev_xvfb_display }}"
fi
cd "{{ item.home }}/{{ item.repo }}"
# Import ~/.bashrc.d modules
if [ -d {{ item.home }}/.bashrc.d ]; then
for BASHMODULE in {{ item.home }}/.bashrc.d/*; do
source $BASHMODULE
done
fi
source "{{ item.home }}/.paver_autocomplete"
cd "{{ item.home }}/{{ item.repo }}"
export JSCOVER_JAR="/usr/local/bin/JSCover-all-{{ localdev_jscover_version }}.jar"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment