File tree 2 files changed +28
-3
lines changed
2 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ arch: any [
151
151
all [word? spec/target-arch spec/target-arch ]
152
152
]
153
153
os: any [
154
+ select get-os-info 'ID
154
155
all [word? spec/os spec/os ]
155
156
select # (
156
157
Macintosh: macos
@@ -182,9 +183,9 @@ abi: any [
182
183
reactos: pe
183
184
beos: pe
184
185
linux: elf
185
- alpine: musl
186
- ) os
187
- ]
186
+ ; alpine: musl
187
+ ) spec / os
188
+ ]
188
189
189
190
product: any [spec/product 'Core]
190
191
configs: unique any [spec/config copy []]
Original file line number Diff line number Diff line change @@ -140,3 +140,27 @@ get-libc-version: function[][
140
140
ver
141
141
]
142
142
143
+ get-os-info : function [
144
+ "Tries to collect information about hosting Linux operating system"
145
+ ] [
146
+ tmp: copy ""
147
+ out: copy # ()
148
+ key: charset [#"A" -#"Z" #"_" ]
149
+ enl: system/catalog/bitsets/crlf
150
+ whs: system/catalog/bitsets/whitespace
151
+ try [
152
+ call/output/shell/wait "cat /etc/*-release" :tmp
153
+ parse tmp [
154
+ any [
155
+ copy k: some key #"=" copy v: to enl some whs (
156
+ try [v: transcode/one v]
157
+ try [parse v ["http" to end (v: as url! v)]]
158
+ put out to word! k v
159
+ )
160
+ | thru enl
161
+ ]
162
+ ]
163
+ ]
164
+ out
165
+ ]
166
+
You can’t perform that action at this time.
0 commit comments