mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 22:47:12 +01:00
scripts: Change to the top source directory as needed
Bugfix on 31919; not in any released version of tor.
This commit is contained in:
parent
18e09913bf
commit
3479024cb1
2 changed files with 4 additions and 1 deletions
|
@ -30,6 +30,7 @@ if test $# -ge 1 ; then
|
|||
"$try_parse" "$@"
|
||||
exitcode=$?
|
||||
else
|
||||
cd "$top" || exit 1
|
||||
# This is the layout in 0.3.5
|
||||
"$try_parse" \
|
||||
src/lib/*/*.[ch] \
|
||||
|
|
|
@ -28,6 +28,8 @@ upstream_name=${TOR_UPSTREAM_REMOTE_NAME:-"upstream"}
|
|||
|
||||
workdir=$(git rev-parse --show-toplevel)
|
||||
|
||||
cd "$workdir" || exit 1
|
||||
|
||||
remote="$1"
|
||||
remote_name=$(git remote --verbose | grep "$2" | awk '{print $1}' | head -n 1)
|
||||
|
||||
|
@ -83,7 +85,7 @@ do
|
|||
|
||||
# We want word splitting here, because file names are space separated
|
||||
# shellcheck disable=SC2086
|
||||
if ! "$workdir/"scripts/git/pre-commit.git-hook $CHECK_FILES; then
|
||||
if ! scripts/git/pre-commit.git-hook $CHECK_FILES ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue