mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Improve the Shell code style.
This commit is contained in:
10
tools/pv.sh
10
tools/pv.sh
@@ -15,12 +15,12 @@
|
||||
|
||||
set -eu
|
||||
|
||||
WORK_DIR=$(dirname $(dirname $(realpath "$0")))
|
||||
URL_FILE=${WORK_DIR}/_config.yml
|
||||
PV_CACHE=${WORK_DIR}/assets/js/data/pageviews.json
|
||||
WORK_DIR="$(dirname $(dirname $(realpath "$0")))"
|
||||
URL_FILE="${WORK_DIR}/_config.yml"
|
||||
PV_CACHE="${WORK_DIR}/assets/js/data/pageviews.json"
|
||||
|
||||
PROXY_URL=$(grep "proxy_endpoint:" $URL_FILE | sed "s/.*: '//g;s/'.*//")
|
||||
PROXY_URL="$(grep "proxy_endpoint:" "$URL_FILE" | sed "s/.*: '//g;s/'.*//")"
|
||||
|
||||
wget $PROXY_URL -O $PV_CACHE
|
||||
wget "$PROXY_URL" -O "$PV_CACHE"
|
||||
|
||||
echo "ls $PV_CACHE"
|
||||
Reference in New Issue
Block a user