1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-06-07 16:17:50 +00:00
2020-01-02 09:13:05 +08:00

24 lines
407 B
Bash
Executable File

#!/bin/bash
#
# Fetch Google Analytics Pageviews reporting cache
# and save as 'assets/data/pagevies.json'
#
# Requirement:
# - jq
# - wget
#
# © 2019 Cotes Chung
# MIT Licensed
set -eu
WORK_DIR=$(dirname $(dirname $(realpath "$0")))
URL_FILE=${WORK_DIR}/assets/data/proxy.json
PV_CACHE=${WORK_DIR}/assets/data/pageviews.json
PROXY_URL=$(jq -r '.proxyUrl' $URL_FILE)
wget $PROXY_URL -O $PV_CACHE