Install obsidian icon from AppImage
This commit is contained in:
parent
5fbc85dade
commit
960f853d1f
@ -13,6 +13,7 @@
|
||||
appimage: 'Obsidian-{{latest.json.name}}.AppImage'
|
||||
- set_fact:
|
||||
filepath: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
|
||||
iconpath: 'share/icons/hicolor/512x512/apps/obsidian.png'
|
||||
asset_query: '[?contains(name, `{{appimage}}`)] | [0]'
|
||||
- set_fact:
|
||||
needs_installed:
|
||||
@ -25,13 +26,37 @@
|
||||
dest: '{{filepath}}'
|
||||
mode: '0755'
|
||||
|
||||
- name: create directories
|
||||
file:
|
||||
path: '{{item}}'
|
||||
state: directory
|
||||
with_items:
|
||||
- '{{ansible_env.HOME}}/.local/bin'
|
||||
- '{{ansible_env.HOME}}/.local/share/icon/hicolor/512x512/apps'
|
||||
|
||||
- name: create symlink
|
||||
file:
|
||||
src: '{{filepath}}'
|
||||
dest: '{{ansible_env.HOME}}/.local/bin/Obsidian'
|
||||
state: link
|
||||
|
||||
# TODO: icon for desktop file
|
||||
- name: extract squashfs-root for app icon
|
||||
when: needs_installed
|
||||
command:
|
||||
cmd: '{{ansible_env.HOME}}/.local/bin/Obsidian --appimage-extract'
|
||||
chdir: '/tmp'
|
||||
|
||||
- name: copy icon file
|
||||
when: needs_installed
|
||||
copy:
|
||||
src: '/tmp/squashfs-root/usr/{{iconpath}}'
|
||||
dest: '{{ansible_env.HOME}}/.local/{{iconpath}}'
|
||||
|
||||
- name: remove squashfs-root directory
|
||||
when: needs_installed
|
||||
file:
|
||||
path: '/tmp/squashfs-root'
|
||||
state: absent
|
||||
|
||||
- name: create desktop file
|
||||
template:
|
||||
|
Loading…
x
Reference in New Issue
Block a user