fix: reduce binary download/copy execution times

Refs salt-formulas/salt-formula-helm#1
diff --git a/helm/client_installed.sls b/helm/client_installed.sls
index d1fc179..75f9aaa 100644
--- a/helm/client_installed.sls
+++ b/helm/client_installed.sls
@@ -16,7 +16,8 @@
     {%- else %}
     - options: v
     {%- endif %}
-    - if_missing: {{ constants.helm.tmp }}/{{ config.flavor }}/helm
+    - onlyif:
+        - test "{{ config.version }}" -eq "canary" || test ! -e {{ constants.helm.tmp }}/{{ config.flavor }}/helm
     - require:
       - file: {{ constants.helm.tmp }}
 
diff --git a/helm/kubectl_installed.sls b/helm/kubectl_installed.sls
index f7e0719..d1b35f0 100644
--- a/helm/kubectl_installed.sls
+++ b/helm/kubectl_installed.sls
@@ -1,9 +1,13 @@
 {%- from slspath + "/map.jinja" import config, constants with context %}
+{%- set extraction_path = constants.helm.tmp + 
+                          "/kubectl/v" + config.kubectl.version %}
+{%- set extracted_binary_path = extraction_path +
+                                "/kubernetes/client/bin/kubectl" %}
 
 {%- if config.kubectl.install %}
 extract_kubectl:
   archive.extracted:
-    - name: {{ constants.helm.tmp }}/kubectl/v{{ config.kubectl.version }}
+    - name: {{ extraction_path }}
     - source: https://dl.k8s.io/v{{ config.kubectl.version }}/kubernetes-client-{{ config.flavor }}.tar.gz
     - source_hash: {{ config.kubectl.download_hash }}
     - archive_format: tar
@@ -12,16 +16,16 @@
     {%- else %}
     - options: v
     {%- endif %}
-    - if_missing: {{ constants.helm.tmp }}/kubectl/v{{ config.kubectl.version }}
-    - require:
-      - file: {{ constants.helm.tmp }}
+    - onlyif:
+          - test ! -e {{ extracted_binary_path }}
 
 {{ constants.kubectl.bin }}:
   file.managed:
-    - source: {{ constants.helm.tmp }}/kubectl/v{{ config.kubectl.version }}/kubernetes/client/bin/kubectl
+    - source: {{ extracted_binary_path }}
     - mode: 555
     - user: root
     - group: root
     - require:
       - archive: extract_kubectl
+    - unless: cmp -s {{ constants.kubectl.bin }} {{ extracted_binary_path }}
 {%- endif %}
\ No newline at end of file