-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
executable file
·482 lines (409 loc) · 18.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
#!/usr/bin/make --makefile
################################################################################
# GaryOS :: Primary Makefile
################################################################################
override GARYOS_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
override GARYOS_TTL := gary-os
########################################
ifneq ($(wildcard $(GARYOS_DIR)/.bashrc),)
export HOME := $(GARYOS_DIR)
endif
ifneq ($(wildcard $(GARYOS_DIR)/gentoo.git),)
export GITDIR := $(GARYOS_DIR)/gentoo.git
endif
########################################
override CHROOT := -g
override C ?= $(GARYOS_DIR)
override S ?= $(GARYOS_DIR)/sources
override O ?= $(GARYOS_DIR)/build
override A ?= $(GARYOS_DIR)/artifacts
override P ?= $(GARYOS_TTL)
override ROOTFS ?=
override DOMODS ?=
override DOREDO ?=
override DOFAST ?=
override DOTEST ?=
override V ?=
override D_OPT := -v
override Q := -q
ifneq ($(V),)
override Q :=
endif
########################################
.NOTPARALLEL:
.POSIX:
.SUFFIXES:
################################################################################
override TITLE := \e[1;32m
override STATE := \e[0;35m
override HOWTO := \e[0;36m
override NOTES := \e[0;33m
override OTHER := \e[1;34m
override RESET := \e[0;37m
override ECHO := echo -en
override MARKER := $(ECHO) "$(OTHER)"; printf "~%.0s" {1..80}; $(ECHO) "$(RESET)\n"
override PRINTF := printf "$(TITLE)%-45.45s$(RESET) $(HOWTO)%s$(NOTES)%s$(STATE)%s$(RESET)\n"
########################################
#NOTE: KEEP THIS OUTPUT TO LESS THAN 80 CHARACTERS WIDE
#>>> @$(ECHO) "$(STATE)>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$(RESET)\n"
.PHONY: usage
usage:
@$(MARKER)
@$(ECHO) "$(NOTES)>>> GARYOS BUILD SYSTEM <<<$(RESET)\n"
@$(MARKER)
@$(ECHO) "\n"
@$(PRINTF) "Synchronize (Database, Sources, Metadata):" "$(MAKE) update"
@$(ECHO) "\n"
@$(PRINTF) "Reset Current Configuration:" "$(MAKE) reset"
@$(PRINTF) "Upgrade Current System (Interactively):" "$(MAKE) upgrade"
@$(ECHO) "\n"
@$(PRINTF) "Information Lookup (Package Data):" "$(MAKE) {packages}" "" " <[category%]name>"
@$(PRINTF) "Information Lookup (Package Search):" "$(MAKE) {searches}"
@$(PRINTF) "Information Lookup (Gentoo Bug URL):" "$(MAKE) {bug_ids}"
@$(ECHO) "\n"
@$(PRINTF) "Chroot Build (Initial):" "$(MAKE) init"
@$(PRINTF) "Chroot Build (Update Only):" "$(MAKE) doit"
@$(PRINTF) "Chroot Build (Kernel Rebuild):" "$(MAKE) krnl"
@$(PRINTF) "Chroot Build (Complete Rebuild):" "$(MAKE) redo"
@$(PRINTF) "Chroot Build (Configuration):" "$(MAKE) edit"
@$(ECHO) "\n"
@$(PRINTF) "Chroot Shell (Bash):" "$(MAKE) shell"
@$(PRINTF) "Chroot Complete (Unmount Cleanup):" "$(MAKE) umount"
@$(ECHO) "\n"
@$(PRINTF) "Initramfs Build (Chroot Reset):" "$(MAKE) clean"
@$(PRINTF) "Initramfs Build (Chroot Create):" "$(MAKE) release"
@$(PRINTF) "Initramfs Build (Chroot Root):" "$(MAKE) rootfs"
@$(PRINTF) "Initramfs Build (Chroot Fetch):" "$(MAKE) fetch"
@$(ECHO) "\n"
@$(PRINTF) "Initramfs System (Live Reset):" "$(MAKE) O=/ clean"
@$(PRINTF) "Initramfs System (Live Create):" "$(MAKE) O=/ release"
@$(PRINTF) "Initramfs System (Live Root):" "$(MAKE) O=/ rootfs"
@$(PRINTF) "Initramfs System (Live Unpack):" "$(MAKE) O=/ unpack"
@$(PRINTF) "Initramfs System (Live Install):" "$(MAKE) O=/ install"
@$(ECHO) "\n"
@$(ECHO) "$(STATE)Helper wrappers for system inspection and development:$(RESET)\n"
@$(ECHO) "\n"
@$(PRINTF) "Chroot Validation (Reverse Dependencies):" "depends-" "[category%]name"
@$(PRINTF) "Chroot Validation (Dependency Graph):" "depgraph-" "[category%]name"
@$(PRINTF) "Chroot Validation (Package Ownership):" "belongs-" "{file|/|%}"
@$(PRINTF) "Chroot Configuration (Overlay Helper):" "overlay-" "[category%]name"
@$(PRINTF) "Chroot Configuration (Overlay Downloader):" "overlay-" "[category%]name^file[^commit]"
@$(PRINTF) "Chroot Emerge Command" "emerge-" "[category%]name"
@$(ECHO) "\n"
@$(ECHO) "$(STATE)Use these variables to change the directories and packages:$(RESET)\n"
@$(ECHO) "$(HOWTO)(...) = $(GARYOS_DIR)$(RESET)\n"
@$(ECHO) "\n"
@$(PRINTF) "Configuration Directory:" "C=" "$(subst $(GARYOS_DIR),(...),$(C))"
@$(PRINTF) "Sources Directory:" "S=" "$(subst $(GARYOS_DIR),(...),$(S))"
@$(PRINTF) "Output Directory:" "O=" "$(subst $(GARYOS_DIR),(...),$(O))"
@$(PRINTF) "Artifacts Directory:" "A=" "$(subst $(GARYOS_DIR),(...),$(A))"
@$(PRINTF) "Package List:" "P=" "$(subst $(GARYOS_DIR),(...),$(P))"
@$(ECHO) "\n"
@$(ECHO) "$(STATE)For more verbose output: $(NOTES)$(MAKE) V=1 [...]$(RESET)\n"
ifeq ($(findstring help,$(MAKECMDGOALS)),)
@$(ECHO) "$(STATE)For more options and build tools: $(NOTES)$(MAKE) help$(RESET)\n"
else
@$(ECHO) "\n"
@$(MARKER)
@$(ECHO) "\n"
@$(ECHO) "$(STATE)Environment variables to control build behavior (true / false):$(RESET)\n"
@$(ECHO) "\n"
@$(PRINTF) "Embedded Rootfs / Initrd (Unsupported):" "ROOTFS=\"`SETDIR="$(C)" ROOTFS="$(ROOTFS)" $(C)/gentoo/_system $(D_OPT) $(CHROOT) ROOTFS`\""
@$(PRINTF) "Minified Build / Standard Build:" "DOMODS=\"`SETDIR="$(C)" DOMODS="$(DOMODS)" $(C)/gentoo/_system $(D_OPT) $(CHROOT) DOMODS`\""
@$(PRINTF) "Clean Rebuild / No Overwrite:" "DOREDO=\"`SETDIR="$(C)" DOREDO="$(DOREDO)" $(C)/gentoo/_system $(D_OPT) $(CHROOT) DOREDO`\""
@$(PRINTF) "Quick Build / Do All Build Steps:" "DOFAST=\"`SETDIR="$(C)" DOFAST="$(DOFAST)" $(C)/gentoo/_system $(D_OPT) $(CHROOT) DOFAST`\""
@$(PRINTF) "(Unsupported) / Validation Build:" "DOTEST=\"`SETDIR="$(C)" DOTEST="$(DOTEST)" $(C)/gentoo/_system $(D_OPT) $(CHROOT) DOTEST`\""
@$(ECHO) "\n"
@$(ECHO) "$(STATE)Build script pass-through targets, for advanced use:$(RESET)\n"
@$(ECHO) "\n"
@$(PRINTF) "Distribution Prepare (Internal Only):" "_prepare_*"
@$(PRINTF) "Distribution Release (Internal Only):" "_release_*"
@$(PRINTF) "Distribution Release (Internal Only):" "_publish_*"
@$(ECHO) "\n"
@$(ECHO) "$(STATE)Below is information on using the \"$(HOWTO)_system$(STATE)\" script directly.$(RESET)\n"
@$(ECHO) "$(STATE)It is important to use the variables shown, at a minimum.$(RESET)\n"
endif
@$(ECHO) "\n"
@$(MARKER)
@$(ECHO) "$(NOTES)>>> HAPPY HACKING! <<<$(RESET)\n"
@$(MARKER)
########################################
.PHONY: help
help: usage
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(D_OPT) $(Q) $(CHROOT)
########################################
.DEFAULT_GOAL := usage
.DEFAULT:
@$(MARKER)
@$(ECHO) "$(HOWTO)>>> CURRENT SYSTEM PACKAGE LOOKUP: $(subst %,/,$(@)) <<<$(RESET)\n"
@$(MARKER)
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(Q) -l "$(subst %,/,$(@))"
@$(ECHO) "\n"
@$(MARKER)
@$(ECHO) "$(HOWTO)>>> CHROOT SYSTEM PACKAGE LOOKUP: $(subst %,/,$(@)) <<<$(RESET)\n"
@$(MARKER)
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(Q) $(CHROOT) -l "$(subst %,/,$(@))"
################################################################################
.PHONY: update
update:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="/" ARTDIR="$(A)" GOSPKG="_$(P)" $(C)/gentoo/_system -U
########################################
.PHONY: reset
reset:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="/" ARTDIR="$(A)" GOSPKG="_$(P)" $(C)/gentoo/_system $(CHROOT) -r -!
.PHONY: upgrade
upgrade:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="/" ARTDIR="$(A)" GOSPKG="_$(P)" $(C)/gentoo/_system -u
########################################
.PHONY: package_list
package_list: .DEFAULT
########################################
.PHONY: init
init:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) -0
.PHONY: doit
doit:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) -/
.PHONY: krnl
krnl:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) -.
.PHONY: redo
redo:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) -1
.PHONY: edit
edit:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) -2
########################################
.PHONY: shell
shell:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) -s
########################################
.PHONY: umount
umount:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) -z
########################################
.PHONY: clean
clean:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _release_reset
.PHONY: release
release:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _release_build
.PHONY: rootfs
rootfs:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _release_rootfs
.PHONY: fetch
fetch:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _release_fetch
.PHONY: unpack
unpack:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _release_unpack
.PHONY: install
install:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _release_install
########################################
.PHONY: depends-%
depends-%:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(Q) $(CHROOT) -y -j depends $(subst %,/,$(*))
.PHONY: depgraph-%
depgraph-%:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(Q) $(CHROOT) -y -j depgraph $(subst %,/,$(*))
.PHONY: belongs-%
belongs-%:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(Q) $(CHROOT) -y -j belongs $(subst %,/,$(*))
.PHONY: overlay-%
overlay-%:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(Q) $(CHROOT) -o $(subst ^, ,$(subst %,/,$(*)))
.PHONY: emerge-%
emerge-%:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(Q) $(CHROOT) -a -s -e $(subst ^, ,$(subst %,/,$(*)))
########################################
.PHONY: _prepare_%
_prepare_%:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _prepare_$(*)
.PHONY: _release_%
_release_%:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _release_$(*)
.PHONY: _publish_%
_publish_%:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _publish_$(*)
################################################################################
#NOTE: THESE ARE FOR DEVELOPMENT AND TESTING AND ARE THEREFORE UNDOCUMENTED
########################################
.PHONY: devel
devel:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _release_devel
.PHONY: check
check:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(CHROOT) _release_review
.PHONY: gendir
gendir:
SETDIR="$(C)" SOURCE="$(S)" GOSDIR="$(O)" ARTDIR="$(A)" GOSPKG="$(P)" $(C)/gentoo/_system $(Q) $(CHROOT) -!
########################################
export COMPOSER ?= $(GARYOS_DIR)/.Composer/Makefile
export MARKDOWN_OUTPUT := GaryOS-Readme.md
export COMPOSER_TARGETS := GaryOS-Readme.html GaryOS-Readme.pdf
export COMPOSER_DEBUGIT := 1
#>>> export CSS := css_alt
export TOC := 6
export OPT := --metadata title="GaryOS Readme"
override GREP ?= grep --color=auto -E
override SED ?= sed -r
override RM ?= rm -fv
.PHONY: readme
readme:
@$(GREP) "^[#*|-]" $(GARYOS_DIR)/README.md
ifeq ($(DOTEST),true)
@$(ECHO) "\n"; $(MARKER); $(GREP) -e "^[#*-]" -e "^[[][^]]+[]][:]" $(GARYOS_DIR)/README.md
@$(ECHO) "\n"; $(MARKER); $(GREP) "^[#*-]" $(GARYOS_DIR)/LICENSE.md
endif
.PHONY: readme-clean
readme-clean:
@$(MAKE) --directory="$(GARYOS_DIR)" --makefile="$(COMPOSER)" clean
@$(RM) $(GARYOS_DIR)/$(MARKDOWN_OUTPUT)
.PHONY: readme-all
readme-all:
@$(SED) -r \
-e "s|^([[]v)([0-9]+)[.]([0-9]+)([ ][X0-9]{4}-[X0-9]{2}-[X0-9]{2}[]]:[ ][#]v)[0-9]+([-][0-9]{4})|\1\2.\3\4\2.\3\5|g" \
-e "s|^([[]v)([0-9]+)[.]([0-9]+)([]]:[ ][#]v)[0-9]+([-][0-9]{4})|\1\2.\3\4\2.\3\5|g" \
README.md >$(GARYOS_DIR)/$(MARKDOWN_OUTPUT)
@$(MAKE) --directory="$(GARYOS_DIR)" --makefile="$(COMPOSER)" $(COMPOSER_TARGETS)
########################################
override TOKN ?=
ifeq ($(findstring @,$(USER)),)
override USER := [email protected]
override ACCT := garybgenett
endif
override WGET := $(if $(WGET_C),$(WGET_C),wget) --output-document=- --auth-no-challenge --user="$(USER)" $(if $(TOKN),--password="$(TOKN)",--ask-password)
override GRIP := grip --title="" --user="$(USER)" $(if $(TOKN),--pass="$(TOKN)")
override JSON := jq --raw-output
ifeq ($(ACCT),)
override ACCT := $(shell $(WGET) https://api.github.com/user | $(JSON) ".login")
ifeq ($(ACCT),)
override ACCT := $(word 2,,$(subst @, ,$(subst ., ,$(USER))))
endif
endif
ifneq ($(DOTEST),true)
override WGET := @$(WGET) 2>/dev/null
override GRIP := @$(GRIP)
endif
override BEG := 2014-02-28
override END := 2038-01-19
override PRD := monthly
ifeq ($(DOREDO),)
override BEG := $(shell expr `date +%s` - \( \( 60 \* 60 \* 24 \) \* 30 \))
override BEG := $(shell date --iso --date='@$(BEG)')
override PRD := daily
endif
override URI := start_date=$(BEG)&end_date=$(END)&period=$(PRD)
override ARCH := generic_64
override VERS := .[].name | select(test("^v[1-9]"))
override TOTL := .total
override LIST_JSON = ( \
[( $(1) \
| select(.[1] != null) \
| { \
key: (.[0] | tostring | sub(" 00:00:00"; "")), \
value: .[1], \
} \
)] \
| sort_by(.$(if $(2),$(2),value)) \
| reverse \
$(if $(3),| .[0:$(3)],) \
| from_entries \
)
override LIST_PRINT = ( \
$(1) \
| to_entries \
| [( \
.[] \
| [ (.key | tostring), (.value | tostring) ] \
| join(": ") \
)] \
)
override LIST_PARSE = ( \
([($(1) | keys | .[])] | unique | .[]) as $$index | [ \
($$index), ( \
[($(1) | indices($$index)) | select(. != null)] | \
add \
) \
] \
)
override SHOW := { \
description: .description, \
homepage: .homepage, \
branch: .default_branch, \
watchers: .watchers, \
forks: .forks, \
fork: .fork, \
}
override LAST := { \
message: .[0].commit.message, \
commit: .[0].sha, \
author: .[0].commit | { \
author_name: .author.name, \
author_date: .author.date, \
commit_name: .committer.name, \
commit_date: .committer.date, \
} \
}
override TREE := $(call LIST_JSON,(.[] | [ .name, .commit.sha ]),key,)
override TAGS := $(call LIST_JSON,(.[] | [ .name, .commit.sha ]),key,)
#>>> override TEAM := { watchers: ([.[].html_url] | sort) }
override TEAM := { watchers: ([.[].login] | sort) }
override DOWN := { \
messages: .messages, \
total: .total, \
downloads: $(call LIST_PRINT,$(call LIST_JSON,.downloads[],key,10)), \
countries: $(call LIST_PRINT,$(call LIST_JSON,.countries[],,10)), \
systems: $(call LIST_PRINT,$(call LIST_JSON,$(call LIST_PARSE,.oses_by_country[]))), \
}
.PHONY: readme-github
readme-github:
@$(ECHO) "USER: $(USER)\n" 1>&2
@$(ECHO) "ACCT: $(ACCT)\n" 1>&2
@$(ECHO) "TOKN: $(TOKN)\n" 1>&2
ifeq ($(DOMODS),true)
@$(ECHO) '['
$(WGET) https://api.github.com/repos/$(ACCT)/$(GARYOS_TTL) | $(JSON) '$(SHOW)'; $(ECHO) ','
$(WGET) https://api.github.com/repos/$(ACCT)/$(GARYOS_TTL)/commits | $(JSON) '$(LAST)'; $(ECHO) ','
$(WGET) https://api.github.com/repos/$(ACCT)/$(GARYOS_TTL)/branches | $(JSON) '$(TREE)'; $(ECHO) ','
$(WGET) https://api.github.com/repos/$(ACCT)/$(GARYOS_TTL)/tags | $(JSON) '$(TAGS)'; $(ECHO) ','
$(WGET) 'https://sourceforge.net/projects/gary-os/files/stats/json?$(URI)' | $(JSON) '$(DOWN)'; $(ECHO) ','
#>>> $(subst @,,$(WGET)) 'https://sourceforge.net/projects/gary-os/files/$(GARYOS_TTL)-$(FILE)-$(ARCH).tiny.kernel/stats/json?$(URI)' | ($(GREP) -a '.' || $(ECHO) '{}') | $(JSON) '$(TOTL) // 0' | tr '\n' ',';
$(if $(DOTEST),,@) \
$(shell $(ECHO) '{') \
$(ECHO) '{"versions":['; \
$(shell $(ECHO) '{') \
$(foreach FILE,$(shell $(subst @,,$(WGET)) https://api.github.com/repos/$(ACCT)/$(GARYOS_TTL)/tags | $(JSON) '$(VERS)'),\
$(ECHO) '"$(FILE):'; \
$(ECHO) ' k('; \
$(subst @,,$(WGET)) 'https://sourceforge.net/projects/gary-os/files/$(GARYOS_TTL)-$(FILE)-$(ARCH).kernel/stats/json?$(URI)' | ($(GREP) -a '.' || $(ECHO) '{}') | $(JSON) '$(TOTL) // 0' | tr '\n' ','; \
$(subst @,,$(WGET)) 'https://sourceforge.net/projects/gary-os/files/$(FILE)/$(GARYOS_TTL)-$(FILE)-$(ARCH).kernel/stats/json?$(URI)' | ($(GREP) -a '.' || $(ECHO) '{}') | $(JSON) '$(TOTL) // 0' | tr '\n' ')'; \
$(ECHO) ' t('; \
$(ECHO) 'x,'; \
$(subst @,,$(WGET)) 'https://sourceforge.net/projects/gary-os/files/$(FILE)/$(GARYOS_TTL)-$(FILE)-$(ARCH).tiny.kernel/stats/json?$(URI)' | ($(GREP) -a '.' || $(ECHO) '{}') | $(JSON) '$(TOTL) // 0' | tr '\n' ')'; \
$(ECHO) ' r('; \
$(subst @,,$(WGET)) 'https://sourceforge.net/projects/gary-os/files/$(GARYOS_TTL)-$(FILE)-$(ARCH).rootfs/stats/json?$(URI)' | ($(GREP) -a '.' || $(ECHO) '{}') | $(JSON) '$(TOTL) // 0' | tr '\n' ','; \
$(subst @,,$(WGET)) 'https://sourceforge.net/projects/gary-os/files/$(FILE)/$(GARYOS_TTL)-$(FILE)-$(ARCH).rootfs/stats/json?$(URI)' | ($(GREP) -a '.' || $(ECHO) '{}') | $(JSON) '$(TOTL) // 0' | tr '\n' ')'; \
$(ECHO) ' b('; \
$(subst @,,$(WGET)) 'https://sourceforge.net/projects/gary-os/files/$(GARYOS_TTL)-$(FILE)-$(ARCH).grub.zip/stats/json?$(URI)' | ($(GREP) -a '.' || $(ECHO) '{}') | $(JSON) '$(TOTL) // 0' | tr '\n' ','; \
$(subst @,,$(WGET)) 'https://sourceforge.net/projects/gary-os/files/$(FILE)/$(GARYOS_TTL)-$(FILE)-$(ARCH).grub.zip/stats/json?$(URI)' | ($(GREP) -a '.' || $(ECHO) '{}') | $(JSON) '$(TOTL) // 0' | tr '\n' ')'; \
$(ECHO) '",'; \
) \
$(shell $(ECHO) '}') \
| sed 's|,$$||g'; \
$(ECHO) ']}\n'; \
$(shell $(ECHO) '}') \
| $(JSON)
@$(ECHO) ','
$(WGET) https://api.github.com/repos/$(ACCT)/$(GARYOS_TTL)/stargazers | $(JSON) '$(TEAM)'; #>>> $(ECHO) ','
@$(ECHO) ']\n'
else
@iptables -I INPUT 1 --proto tcp --dport 6419 -j ACCEPT
$(GRIP) --clear
#>>> $(GRIP) --export $(GARYOS_DIR) $(firstword $(COMPOSER_TARGETS))
$(GRIP) 0.0.0.0:6419
endif
################################################################################
# End Of File
################################################################################