Skip to content

Commit d749ef2

Browse files
committed
Fix the path contains spaces lead to tool script failure (cotes2020#117)
1 parent 0d84980 commit d749ef2

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

_scripts/sh/sync_monitor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [[ ! -f "$1" ]]; then
1515
exit 0
1616
fi
1717

18-
src_dir="$(dirname $(realpath "$1"))"
18+
src_dir="$(dirname "$(realpath "$1")")"
1919

2020
dir_prefix="$(realpath "$2")/"
2121

tools/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set -eu
1010

1111
CMD="JEKYLL_ENV=production bundle exec jekyll b"
1212

13-
WORK_DIR="$(dirname $(dirname $(realpath "$0")))"
13+
WORK_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
1414

1515
CONTAINER="${WORK_DIR}/.container"
1616

tools/publish.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ CATEGORIES=false
1313
TAGS=false
1414
LASTMOD=false
1515

16-
WORK_DIR="$(dirname $(dirname $(realpath "$0")))"
16+
WORK_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
17+
1718

1819
check_status() {
1920
local _change=$(git status . -s)

tools/pv.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515

1616
set -eu
1717

18-
WORK_DIR="$(dirname $(dirname $(realpath "$0")))"
18+
WORK_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
1919
URL_FILE="${WORK_DIR}/_config.yml"
2020
PV_CACHE="${WORK_DIR}/assets/js/data/pageviews.json"
2121

2222
PROXY_URL="$(grep "proxy_endpoint:" "$URL_FILE" | sed "s/.*: '//g;s/'.*//")"
2323

2424
wget "$PROXY_URL" -O "$PV_CACHE"
2525

26-
echo "ls $PV_CACHE"
26+
echo "ls $PV_CACHE"

tools/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
set -eu
1414

15-
WORK_DIR=$(dirname $(dirname $(realpath "$0")))
15+
WORK_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
1616

1717
CONTAINER=.container
1818
SYNC_TOOL=_scripts/sh/sync_monitor.sh

0 commit comments

Comments
 (0)