Skip to content

Commit

Permalink
Fix man page installations
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Feb 23, 2024
1 parent 5870635 commit b8673d1
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 19 deletions.
1 change: 1 addition & 0 deletions roles/bash/files/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ unset color_prompt
LC_ALL="en_US.UTF-8"

PATH=~/.bin/:${PATH}
MANPATH=~/.man/:${MANPATH}

# no zsh here!
export BASH_SILENCE_DEPRECATION_WARNING=1
6 changes: 6 additions & 0 deletions roles/bash/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@
- {src: files/bin/clipboard.sh, dest: "{{ home_folder }}/.bin/clipboard"}
- {src: files/bin/colors.sh, dest: "{{ home_folder }}/.bin/colors"}
- {src: files/bin/passphrase.sh, dest: "{{ home_folder }}/.bin/passphrase"}

- name: Create ~/.man/ folder
ansible.builtin.file:
path: "{{ home_folder }}/.man/man1/"
state: directory
mode: '755'
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# shellcheck disable=SC2148
# shellcheck disable=SC1090
. ~/.local/share/z/z.sh
. ~/.local/shared/z/z.sh
File renamed without changes.
File renamed without changes.
33 changes: 15 additions & 18 deletions roles/terminal/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@
state: present
become: "{{ become_root }}"

- name: Add bash functions to ~/.bashrc
ansible.builtin.blockinfile:
path: "{{ home_folder }}/.bashrc"
marker: "# {mark} terminal/files/functions.sh"
block: "{{ lookup('file', 'files/functions.sh') }}"


- name: Create ~/.local/share/z/ folder
ansible.builtin.file:
path: "{{ home_folder }}/.local/share/z/"
Expand All @@ -44,20 +37,24 @@

- name: Copy z.sh to shared folder
ansible.builtin.copy:
src: files/z.sh
src: files/z/z.sh
dest: "{{ home_folder }}/.local/shared/z/"
mode: preserve

# - name: Install z man page
# ansible.builtin.copy:
# src: files/z.1
# dest: "/usr/share/man/man1/"
# mode: preserve
# become: "{{ become_root }}"
- name: Install z man page
ansible.builtin.copy:
src: files/z/z.1
dest: "{{ home_folder }}/.man/man1"
mode: preserve

- name: Add terminal functions to ~/.bashrc
ansible.builtin.blockinfile:
path: "{{ home_folder }}/.bashrc"
marker: "# {mark} terminal/files/functions.sh"
block: "{{ lookup('file', 'files/functions.sh') }}"

- name: Add z
when: ansible_distribution == 'MacOSX'
- name: Add terminal includes to ~/.bashrc
ansible.builtin.blockinfile:
path: "{{ home_folder }}/.bashrc"
marker: "# {mark} terminal_z.sh"
block: "{{ lookup('file', 'files/terminal_z.sh') }}"
marker: "# {mark} terminal/files/includes.sh"
block: "{{ lookup('file', 'files/includes.sh') }}"

0 comments on commit b8673d1

Please sign in to comment.