Skip to content

Commit

Permalink
merge bitcoin#20359: Various config.site.in improvements and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg authored and gades committed Nov 9, 2023
1 parent 05914f4 commit f6924d1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
16 changes: 13 additions & 3 deletions depends/config.site.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
depends_prefix="`dirname ${ac_site_file}`/.."
# shellcheck shell=sh disable=SC2034 # Many variables set will be used in
# ./configure but shellcheck doesn't know
# that, hence: disable=SC2034

true # Dummy command because shellcheck treats all directives before first
# command as file-wide, and we only want to disable for one line.
#
# See: https://github.com/koalaman/shellcheck/wiki/Directive

# shellcheck disable=SC2154
depends_prefix="$(cd "$(dirname ${ac_site_file})/.." && pwd)"

cross_compiling=maybe
host_alias=@HOST@
Expand Down Expand Up @@ -60,7 +70,7 @@ if test x@host_os@ = xmingw32; then
fi

PATH=$depends_prefix/native/bin:$PATH
PKG_CONFIG="`which pkg-config` --static"
PKG_CONFIG="$(which pkg-config) --static"

# These two need to remain exported because pkg-config does not see them
# otherwise. That means they must be unexported at the end of configure.ac to
Expand All @@ -78,7 +88,7 @@ fi
if test -n "@CXX@" -a -z "${CXX}"; then
CXX="@CXX@"
fi
PYTHONPATH=$depends_prefix/native/lib/python3/dist-packages:$PYTHONPATH
PYTHONPATH="${depends_prefix}/native/lib/python3/dist-packages${PYTHONPATH:+${PATH_SEPARATOR}}${PYTHONPATH}"

if test -n "@AR@"; then
AR=@AR@
Expand Down
3 changes: 2 additions & 1 deletion test/lint/lint-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ if ! command -v gawk > /dev/null; then
fi

EXCLUDE="--exclude=$(IFS=','; echo "${disabled[*]}")"
if ! shellcheck "$EXCLUDE" $(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|univalue)/'); then
SOURCED_FILES=$(git ls-files | xargs gawk '/^# shellcheck shell=/ {print FILENAME} {nextfile}') # Check shellcheck directive used for sourced files
if ! shellcheck "$EXCLUDE" $SOURCED_FILES $(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|univalue)/'); then
EXIT_CODE=1
fi

Expand Down

0 comments on commit f6924d1

Please sign in to comment.