Commit fced48c7 by Ned Batchelder

Use a .bashrc.d directory for more flexible configuration

parent 9168b348
...@@ -72,11 +72,21 @@ ...@@ -72,11 +72,21 @@
line: ". {{ localdev_home }}/share_x11" line: ". {{ localdev_home }}/share_x11"
state: present 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 # Create scripts to add paver autocomplete
- name: Add paver autocomplete - name: Add paver autocomplete
copy: copy:
src: paver_autocomplete src: paver_autocomplete.sh
dest: "{{ item.home }}/.paver_autocomplete" dest: "{{ item.home }}/.bashrc.d/paver_autocomplete.sh"
owner: "{{ item.user }}" owner: "{{ item.user }}"
group: "{{ common_web_group }}" group: "{{ common_web_group }}"
mode: "0755" mode: "0755"
......
...@@ -28,8 +28,13 @@ else ...@@ -28,8 +28,13 @@ else
export DISPLAY="{{ localdev_xvfb_display }}" export DISPLAY="{{ localdev_xvfb_display }}"
fi 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" 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