nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 STAT_WGET := $(shell command -v wget 2> /dev/null)
2 STAT_CURL := $(shell command -v curl 2> /dev/null)
3 ifneq ("$(wildcard $(NEXMON_ROOT)/.UUID)","")
4 STAT_UUID := $(shell cat $(NEXMON_ROOT)/.UUID | base64)
5 else
6 STAT_UUID := $(shell cat /dev/urandom | LC_ALL=C tr -dc A-Z0-9 | head -c32 > $(NEXMON_ROOT)/.UUID && cat $(NEXMON_ROOT)/.UUID | base64)
7 endif
8 STAT_UNAME := $(shell uname -srmp | base64)
9 STAT_PATH := $(shell git rev-parse --show-prefix | base64)
10 ifeq ("$(STAT_PATH)","Cg==")
11 STAT_PATH := $(shell echo $$(cd .. && git rev-parse --show-prefix)$$(basename `pwd`) | base64)
12 endif
13 STAT_GIT_VERSION := $(shell git describe --abbrev=8 --dirty --always --tags | base64)
14 STAT_GIT_REMOTE := $(shell git config --get remote.origin.url | base64)
15 #STAT_URL := http://172.16.121.1:8888/statistics/
16 STAT_URL := https://nexmon.org/statistics/
17 STAT_DATA := "uuid=$(STAT_UUID)&uname=$(STAT_UNAME)&path=$(STAT_PATH)&version=$(STAT_GIT_VERSION)&remote=$(STAT_GIT_REMOTE)"
18  
19 statistics: FORCE
20 ifdef STAT_WGET
21 $(Q)$(STAT_WGET) --user-agent="Nexmon" --post-data=$(STAT_DATA) --quiet --background --delete-after --no-check-certificate $(STAT_URL) > /dev/null 2> /dev/null
22 else
23 ifdef STAT_CURL
24 $(Q)$(STAT_CURL) -A "Nexmon" --data $(STAT_DATA) $(STAT_URL) > /dev/null 2> /dev/null &
25 endif
26 endif
27  
28 FORCE: