chore: enable linting of shell scripts (#11031)
This commit is contained in:
parent
51facf751b
commit
3518577992
|
|
@ -48,7 +48,7 @@ jobs:
|
|||
# Run Linter against code base #
|
||||
################################
|
||||
- name: Lint Code Base
|
||||
uses: github/super-linter@v4.8.1
|
||||
uses: github/super-linter@v4.9.2
|
||||
env:
|
||||
VALIDATE_ALL_CODEBASE: false
|
||||
DEFAULT_BRANCH: master
|
||||
|
|
@ -56,3 +56,4 @@ jobs:
|
|||
LINTER_RULES_PATH: '.'
|
||||
MARKDOWN_CONFIG_FILE: .markdownlint.yml
|
||||
VALIDATE_MARKDOWN: true
|
||||
VALIDATE_BASH: true
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ fi
|
|||
#compare dotted versions
|
||||
#see https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
|
||||
vercomp () {
|
||||
if [[ $1 == $2 ]]
|
||||
if [[ $1 == "$2" ]]
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
local IFS=.
|
||||
local i ver1=($1) ver2=($2)
|
||||
local i ver1=("$1") ver2=("$2")
|
||||
# fill empty fields in ver1 with zeros
|
||||
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))
|
||||
do
|
||||
|
|
@ -68,7 +68,7 @@ fi
|
|||
objdump -T "$prog" | # get the dynamic symbol table
|
||||
sed -n "s/.* GLIBC_\([0-9.]\+\).*/\1/p" | # find the entries for glibc and grab the version
|
||||
sort | uniq | # remove duplicates
|
||||
while read v; do
|
||||
while read -r v; do
|
||||
set +e
|
||||
vercomp "$v" "$max" # fail if any version is newer than our max
|
||||
comp=$?
|
||||
|
|
|
|||
Loading…
Reference in New Issue