diff --git a/states/sublimetext/defaults.yaml b/states/sublimetext/defaults.yaml index 2fda9c1..36866aa 100644 --- a/states/sublimetext/defaults.yaml +++ b/states/sublimetext/defaults.yaml @@ -3,3 +3,4 @@ sublimetext: fetch_url: https://paulbsd-pub.s3.fr-par.scw.cloud/sublimetext archive_name: sublime_text_build_4107_x64.tar.bz2 install_dir: /opt + install_subdir: sublime_text diff --git a/states/sublimetext/init.sls b/states/sublimetext/init.sls index 40aebe2..43998fe 100644 --- a/states/sublimetext/init.sls +++ b/states/sublimetext/init.sls @@ -8,11 +8,11 @@ sublime-text-extract-archive: - user: root - group: root - mode: 0755 - - if_missing: {{ sublimetext.install_dir }}/sublime_text_3 + - if_missing: {{ sublimetext.install_dir }}/{{ sublimetext.install_subdir }} sublime-text-licence-key: file.managed: - - name: {{ sublimetext.install_dir }}/sublime_text_3/sublime_text_keys.txt + - name: {{ sublimetext.install_dir }}/{{ sublimetext.install_subdir }}/sublime_text_keys.txt - source: salt://sublimetext/sublime_text_keys.txt.j2 - template: jinja - user: root @@ -31,7 +31,7 @@ sublime-text-desktop-entry: sublime-text-symlink: file.symlink: - name: /usr/bin/sublime_text - - target: {{ sublimetext.install_dir }}/sublime_text_3/sublime_text + - target: {{ sublimetext.install_dir }}/{{ sublimetext.install_subdir }}/sublime_text - user: root - group: root - mode: 0755 \ No newline at end of file diff --git a/states/sublimetext/sublime_text.desktop.j2 b/states/sublimetext/sublime_text.desktop.j2 index e8129f0..a7edc7f 100644 --- a/states/sublimetext/sublime_text.desktop.j2 +++ b/states/sublimetext/sublime_text.desktop.j2 @@ -5,20 +5,20 @@ Type=Application Name=Sublime Text GenericName=Text Editor Comment=Sophisticated text editor for code, markup and prose -Exec={{ sublimetext.install_dir }}/sublime_text_3/sublime_text %F +Exec={{ sublimetext.install_dir }}/{{ sublimetext.install_subdir }}/sublime_text %F Terminal=false MimeType=text/plain; -Icon={{ sublimetext.install_dir }}/sublime_text_3/Icon/48x48/sublime-text.png +Icon={{ sublimetext.install_dir }}/{{ sublimetext.install_subdir }}/Icon/48x48/sublime-text.png Categories=TextEditor;Development; StartupNotify=true Actions=Window;Document; [Desktop Action Window] Name=New Window -Exec={{ sublimetext.install_dir }}/sublime_text_3/sublime_text -n +Exec={{ sublimetext.install_dir }}/{{ sublimetext.install_subdir }}/sublime_text -n OnlyShowIn=Unity; [Desktop Action Document] Name=New File -Exec={{ sublimetext.install_dir }}/sublime_text_3/sublime_text --command new_file +Exec={{ sublimetext.install_dir }}/{{ sublimetext.install_subdir }}/sublime_text --command new_file OnlyShowIn=Unity; \ No newline at end of file