From ab270ed63c1c6740f484812b2d7819c990b39d3e Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Mon, 22 Mar 2021 19:11:32 +0100 Subject: [PATCH] updated telegram state --- .gitattributes | 2 ++ states/telegram/install.sls | 16 ++++++++++++---- states/telegram/telegram.png | 3 +++ 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 .gitattributes create mode 100644 states/telegram/telegram.png diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1691f22 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.png filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text diff --git a/states/telegram/install.sls b/states/telegram/install.sls index 7e7c1a8..394e1e4 100644 --- a/states/telegram/install.sls +++ b/states/telegram/install.sls @@ -2,27 +2,35 @@ {%- from "telegram/map.jinja" import telegram with context %} telegram-archive-extract: archive.extracted: - - name: {{ telegram.dest_path }}{{ telegram.version }} + - name: {{ telegram.release_dir }}/telegram-{{ telegram.version }} - source: {{ telegram.mirror }}/v{{ telegram.version }}/tsetup.{{ telegram.version }}.tar.xz - skip_verify: true - archive_format: tar - enforce_toplevel: false - options: --transform 's/Telegram/telegram/g' --transform 's/Updater/updater/g' --strip 1 - keep: true - - if_missing: {{ telegram.dest_path }}{{ telegram.version }}/telegram + - if_missing: {{ telegram.release_dir }}/telegram-{{ telegram.version }}/telegram telegram-symlink: file.symlink: - name: {{ telegram.install_dir }}/telegram - - target: {{ telegram.dest_path }}{{ telegram.version }} + - target: {{ telegram.release_dir }}/telegram-{{ telegram.version }} - force: true telegram-bin-symlink: file.symlink: - name: /usr/bin/telegram - - target: {{ telegram.dest_path }}{{ telegram.version }}/telegram + - target: {{ telegram.install_dir }}/telegram/telegram - force: true +telegram-icon: + file.managed: + - name: /usr/share/icons/telegram.png + - source: salt://telegram/telegram.png + - user: root + - group: root + - mode: 644 + telegram-shortcut: file.managed: - name: /usr/share/applications/telegram.desktop diff --git a/states/telegram/telegram.png b/states/telegram/telegram.png new file mode 100644 index 0000000..f514f8b --- /dev/null +++ b/states/telegram/telegram.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:871f2a6d3bd9d657f8379196e51fd3117c1586e0042e9e993ae138f78b2bcd76 +size 21094