Fix the path contains spaces lead to tool script failure (#117)

This commit is contained in:
Cotes Chung 2020-08-30 14:49:36 +08:00
parent 31656e8cda
commit 2d7df50774
5 changed files with 7 additions and 6 deletions

View file

@ -15,7 +15,7 @@ if [[ ! -f "$1" ]]; then
exit 0
fi
src_dir="$(dirname $(realpath "$1"))"
src_dir="$(dirname "$(realpath "$1")")"
dir_prefix="$(realpath "$2")/"

View file

@ -10,7 +10,7 @@ set -eu
CMD="JEKYLL_ENV=production bundle exec jekyll b"
WORK_DIR="$(dirname $(dirname $(realpath "$0")))"
WORK_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
CONTAINER="${WORK_DIR}/.container"

View file

@ -13,7 +13,8 @@ CATEGORIES=false
TAGS=false
LASTMOD=false
WORK_DIR="$(dirname $(dirname $(realpath "$0")))"
WORK_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
check_status() {
local _change=$(git status . -s)

View file

@ -15,7 +15,7 @@
set -eu
WORK_DIR="$(dirname $(dirname $(realpath "$0")))"
WORK_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
URL_FILE="${WORK_DIR}/_config.yml"
PV_CACHE="${WORK_DIR}/assets/js/data/pageviews.json"
@ -23,4 +23,4 @@ PROXY_URL="$(grep "proxy_endpoint:" "$URL_FILE" | sed "s/.*: '//g;s/'.*//")"
wget "$PROXY_URL" -O "$PV_CACHE"
echo "ls $PV_CACHE"
echo "ls $PV_CACHE"

View file

@ -12,7 +12,7 @@
set -eu
WORK_DIR=$(dirname $(dirname $(realpath "$0")))
WORK_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
CONTAINER=.container
SYNC_TOOL=_scripts/sh/sync_monitor.sh