Skip to content

Commit

Permalink
Fix the path contains spaces lead to tool script failure (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Aug 30, 2020
1 parent 0d84980 commit d749ef2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _scripts/sh/sync_monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")/"

Expand Down
2 changes: 1 addition & 1 deletion tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 2 additions & 1 deletion tools/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tools/pv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

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"

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"
2 changes: 1 addition & 1 deletion tools/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d749ef2

Please sign in to comment.