8000 Make it possible to invoke build.sh from anywhere · Ritsyy/html-build@78f95ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 78f95ab

Browse files
committed
Make it possible to invoke build.sh from anywhere
Simply cd to its directory, but keep $DIR around since it's used in the output to tell the user which source file is being used.
1 parent 48effd2 commit 78f95ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
set -e
33
HTML_GIT_CLONE_OPTIONS=${HTML_GIT_CLONE_OPTIONS:-"--depth 1"}
44

5-
# Absolute path to the directory containing this script
6-
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5+
# cd to the directory containing this script
6+
cd "$( dirname "${BASH_SOURCE[0]}" )"
7+
DIR=$(pwd)
78

89
DO_UPDATE=true
910
VERBOSE=false

0 commit comments

Comments
 (0)
0