github release role update

- If `man_path` is defiled will add man page to system
 - If `autocomplete_path` is defined will add autocomplete source
This commit is contained in:
Sagi Dayan 2022-01-05 14:32:39 +02:00
parent f5f32b0c7e
commit b44dfac7e0
Signed by: sagi
GPG key ID: FAB96BFC63B46458
4 changed files with 37 additions and 4 deletions

View file

@ -108,8 +108,10 @@ source ~/.shellconfig/aliases.sh
source ~/.shellconfig/environment.sh
# Functions
source ~/.shellconfig/functions.sh
# Auto complete functions
if [ -d ~/.shellconfig/autocomplete ]; then
[ "$(ls -A ~/.shellconfig/autocomplete/)" ] && source <(cat ~/.shellconfig/autocomplete/*)
fi
# Start tmux if not in a session

View file

@ -10,6 +10,7 @@
- git
- ranger
- jq
- man-db
state: present
- name: Some more packages (RedHat based)
@ -64,6 +65,11 @@
path: ~/.shellconfig
state: directory
- name: Verifying shell autocomplete config folder
file:
path: ~/.shellconfig/autocomplete
state: directory
- name: Sync Common shell settings...
changed_when: false
copy:

View file

@ -38,9 +38,27 @@
- name: Moving bin to /usr/local/bin
become: true
shell: |
cp /tmp{{ bin_path }} /usr/local/bin/{{ name }}
cp /tmp{{ bin_path }} /usr/local/bin/
when: version != local_version
- name: Adding man page if needed
become: true
shell: |
cp /tmp{{ man_path }} /usr/share/man/man1/
register: added_man
when: man_path is defined and (version != local_version)
- name: Update mandb if needed
become: true
shell: mandb
when: added_man is defined
- name: Adding autocomplete if needed
shell: |
cp /tmp/{{ autocomplete_path }} ~/.shellconfig/autocomplete/
when: autocomplete_path is defined and (version != local_version)
- name: Updating local version entry
shell: echo {{ version }} > {{ local_version_file }}
when: version != local_version

View file

@ -5,7 +5,9 @@
vars:
name: bat
repo: sharkdp/bat
bin_path: "/bat*/bat"
bin_path: "/bat-*/bat"
man_path: "/bat-*/bat.1"
autocomplete_path: "/bat-*/autocomplete/bat.bash"
filter: x86_64-unknown-linux-gnu
- name: verify Bat (better Cat) theme
@ -25,6 +27,7 @@
name: btm
repo: ClementTsang/bottom
bin_path: "/btm"
autocomplete_path: "/completion/btm.bash"
filter: bottom_x86_64-unknown-linux-gnu.tar.gz
- name: Installing gitui
@ -60,6 +63,8 @@
name: lsd
repo: Peltoche/lsd
bin_path: "/lsd-*/lsd"
man_path: "/lsd-*/lsd.1"
autocomplete_path: "/lsd-*/autocomplete/lsd.bash-completion"
filter: x86_64-unknown-linux-gnu.tar.gz
- name: Installing ripgrep (grep like)
@ -69,5 +74,7 @@
name: rg
repo: BurntSushi/ripgrep
bin_path: "/ripgrep-*/rg"
man_path: "/ripgrep-*/doc/rg.1"
autocomplete_path: "/ripgrep-*/complete/rg.bash"
filter: x86_64-unknown-linux-musl.tar.gz