Skip to content

Commit 913d593

Browse files
committed
add checking for tar options
1 parent 4bfa2fb commit 913d593

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

node/binary.sls

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,21 @@
88
{% endif -%}
99
{% set pkgname = 'node-v' ~ version ~ '-linux-' ~ arch -%}
1010
{% set format = node.get('format', 'gz') -%}
11+
{% if format == 'xz' -%}
12+
{% set tar_options = 'J' -%}
13+
{% elif format == 'bz2' -%}
14+
{% set tar_options = 'j' -%}
15+
{% else -%}
16+
{% set tar_options = 'z' -%}
17+
{% endif -%}
1118

1219
Extract binary package:
1320
archive.extracted:
1421
- name: /usr/local/src/
1522
- source: https://nodejs.org/dist/v{{ version }}/{{ pkgname }}.tar.{{ format }}
1623
- source_hash: {{ checksum }}
1724
- archive_format: tar
25+
- tar_options: {{ tar_options }}
1826
- if_missing: /usr/local/src/{{ pkgname }}
1927

2028
Copy lib:

0 commit comments

Comments
 (0)