Compare commits
1 Commits
65f44a8454
...
58b77079a4
Author | SHA1 | Date | |
---|---|---|---|
58b77079a4 |
@ -13,7 +13,6 @@
|
|||||||
appimage: 'Obsidian-{{latest.json.name}}.AppImage'
|
appimage: 'Obsidian-{{latest.json.name}}.AppImage'
|
||||||
- set_fact:
|
- set_fact:
|
||||||
filepath: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
|
filepath: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
|
||||||
iconpath: 'share/icons/hicolor/512x512/apps/obsidian.png'
|
|
||||||
asset_query: '[?contains(name, `{{appimage}}`)] | [0]'
|
asset_query: '[?contains(name, `{{appimage}}`)] | [0]'
|
||||||
- set_fact:
|
- set_fact:
|
||||||
needs_installed:
|
needs_installed:
|
||||||
@ -32,7 +31,7 @@
|
|||||||
state: directory
|
state: directory
|
||||||
with_items:
|
with_items:
|
||||||
- '{{ansible_env.HOME}}/.local/bin'
|
- '{{ansible_env.HOME}}/.local/bin'
|
||||||
- '{{ansible_env.HOME}}/.local/share/icons/hicolor/512x512/apps'
|
- '{{ansible_env.HOME}}/.local/share/icon/hicolor/512x512/apps'
|
||||||
|
|
||||||
- name: create symlink
|
- name: create symlink
|
||||||
file:
|
file:
|
||||||
@ -41,19 +40,16 @@
|
|||||||
state: link
|
state: link
|
||||||
|
|
||||||
- name: extract squashfs-root for app icon
|
- name: extract squashfs-root for app icon
|
||||||
when: needs_installed
|
|
||||||
command:
|
command:
|
||||||
cmd: '{{ansible_env.HOME}}/.local/bin/Obsidian --appimage-extract'
|
cmd: '{{ansible_env.HOME}}/.local/bin/Obsidian --appimage-extract'
|
||||||
chdir: '/tmp'
|
chdir: '/tmp'
|
||||||
|
|
||||||
- name: copy icon file
|
- name: copy icon file
|
||||||
when: needs_installed
|
|
||||||
copy:
|
copy:
|
||||||
src: '/tmp/squashfs-root/usr/{{iconpath}}'
|
src: '/tmp/squashfs-root/usr/share/icons/hicolor/512x512/apps/obsidian.png'
|
||||||
dest: '{{ansible_env.HOME}}/.local/{{iconpath}}'
|
dest: '{{ansible_env.HOME}}/.local/share/icon/hicolor/512x512/apps/'
|
||||||
|
|
||||||
- name: remove squashfs-root directory
|
- name: remove squashfs-root directory
|
||||||
when: needs_installed
|
|
||||||
file:
|
file:
|
||||||
path: '/tmp/squashfs-root'
|
path: '/tmp/squashfs-root'
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -3,7 +3,7 @@ Name=Obsidian
|
|||||||
Exec={{ansible_env.HOME}}/.local/bin/Obsidian
|
Exec={{ansible_env.HOME}}/.local/bin/Obsidian
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Icon=obsidian
|
Icon={{ansible_env.HOME}}/.local/share/icon/hicolor/512x512/apps/obsidian.png
|
||||||
StartupWMClass=Obsidian
|
StartupWMClass=Obsidian
|
||||||
X-AppImage-Version={{latest.json.name}}
|
X-AppImage-Version={{latest.json.name}}
|
||||||
Comment=Private and flexible note‑taking app that adapts to the way you think.
|
Comment=Private and flexible note‑taking app that adapts to the way you think.
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
appimage: 'WebCatalog-{{releases[0].version}}.AppImage'
|
appimage: 'WebCatalog-{{releases[0].version}}.AppImage'
|
||||||
- set_fact:
|
- set_fact:
|
||||||
filepath: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
|
filepath: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
|
||||||
iconpath: 'share/icons/hicolor/512x512/apps/webcatalog.png'
|
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
needs_installed:
|
needs_installed:
|
||||||
@ -29,37 +28,13 @@
|
|||||||
dest: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
|
dest: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: create directories
|
|
||||||
file:
|
|
||||||
path: '{{item}}'
|
|
||||||
state: directory
|
|
||||||
with_items:
|
|
||||||
- '{{ansible_env.HOME}}/.local/bin'
|
|
||||||
- '{{ansible_env.HOME}}/.local/share/icons/hicolor/512x512/apps'
|
|
||||||
|
|
||||||
- name: create symlink
|
- name: create symlink
|
||||||
file:
|
file:
|
||||||
src: '{{filepath}}'
|
src: '{{filepath}}'
|
||||||
dest: '{{ansible_env.HOME}}/.local/bin/WebCatalog'
|
dest: '{{ansible_env.HOME}}/.local/bin/WebCatalog'
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
- name: extract squashfs-root for app icon
|
# TODO: icon for desktop file
|
||||||
when: needs_installed
|
|
||||||
command:
|
|
||||||
cmd: '{{ansible_env.HOME}}/.local/bin/WebCatalog --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
|
- name: create desktop file
|
||||||
template:
|
template:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user