updated androidstudio state

This commit is contained in:
Paul 2021-10-02 12:46:10 +02:00
parent 62c3dec0ef
commit 757959fc78
3 changed files with 34 additions and 23 deletions

View File

@ -1,5 +1,7 @@
--- ---
androidstudio: androidstudio:
# https://developer.android.com/studio/archive.html
enabled: true enabled: true
install_dir: /usr/local/apps install_dir: /usr/local/apps
release_dir: /usr/local/apps/releases
config: {} config: {}

View File

@ -1,24 +1,3 @@
--- ---
# https://developer.android.com/studio/archive.html include:
{%- from "androidstudio/map.jinja" import androidstudio with context %} - .install
{%- if salt['file.grep'](androidstudio.install_dir + '/android-studio/build.txt', androidstudio.version_regex)['retcode'] == 1 or not salt['file.file_exists'](androidstudio.install_dir + '/android-studio/build.txt') %}
androidstudio-archive-extract:
archive.extracted:
- name: {{ androidstudio.install_dir }}
- source: {{ androidstudio.mirror }}/{{ androidstudio.version }}/android-studio-ide-{{ androidstudio.tag }}-linux.tar.gz
- skip_verify: true
- archive_format: tar
- overwrite: true
androidstudio-shortcut:
file.managed:
- name: /usr/share/applications/jetbrains-studio.desktop
- source: salt://androidstudio/jetbrains-studio.desktop.j2
- user: root
- group: root
- mode: 644
- template: jinja
- onchanges:
- androidstudio-archive-extract
{%- endif %}

View File

@ -0,0 +1,30 @@
---
{%- from "androidstudio/map.jinja" import androidstudio with context %}
androidstudio-archive-extract:
archive.extracted:
- name: {{ androidstudio.install_dir }}
- source: {{ androidstudio.mirror }}/{{ androidstudio.version }}/android-studio-ide-{{ androidstudio.tag }}-linux.tar.gz
- skip_verify: true
- archive_format: tar
- overwrite: true
- if_missing: {{ androidstudio.release_dir }}/androidstudio-{{ androidstudio.version }}
- watch:
- file: androidstudio-link
- file: androidstudio-shortcut
androidstudio-link:
file.symlink:
- name: {{ androidstudio.install_dir }}/androidstudio
- target: {{ androidstudio.release_dir }}/androidstudio-{{ androidstudio.version }}
- force: true
androidstudio-shortcut:
file.managed:
- name: /usr/share/applications/jetbrains-studio.desktop
- source: salt://androidstudio/jetbrains-studio.desktop.j2
- user: root
- group: root
- mode: 644
- template: jinja
- onchanges:
- androidstudio-archive-extract