diff --git a/tools/check-links.sh b/tools/check-links.sh new file mode 100644 index 00000000..455d9cb6 --- /dev/null +++ b/tools/check-links.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# +# Check for valid symbolic links for non-Steam gamefixes +# + +# Lint the following gamefix dir: +# gog, amazon, egs, humble, itchio, ubisoft, ulwgl, zoomplatform +for file in ./{gamefixes-amazon,gamefixes-gog,gamefixes-egs,gamefixes-humble,gamefixes-itchio,gamefixes-ubisoft,gamefixes-ulwgl,gamefixes-zoomplatform}/*; do + if [[ -L "$file" && ! -e "$file" ]]; then + echo "The following file is not a valid link: ${file}" + exit 1 + fi +done diff --git a/tools/preflight-check.sh b/tools/lint.sh similarity index 58% rename from tools/preflight-check.sh rename to tools/lint.sh index 68a534ed..31b332fd 100644 --- a/tools/preflight-check.sh +++ b/tools/lint.sh @@ -1,18 +1,11 @@ #!/usr/bin/env bash # -# Lint using Pylint and check for valid symbolic links for directories with fixes. +# Lint with Pylint # -# Links -for file in ./{gamefixes-steam,gamefixes-amazon,gamefixes-gog,gamefixes-egs,gamefixes-humble,gamefixes-itchio,gamefixes-ubisoft,gamefixes-ulwgl,gamefixes-zoomplatform}/*; do - if [[ -L "$file" && ! -e "$file" ]]; then - echo "The following file is not a valid link: ${file}" - exit 1 - fi -done - -# Lint +# Lint the following gamefix dir: +# steam, gog, amazon, egs, humble, itchio, ubisoft, ulwgl, zoomplatform mapfile -d '' files_array < <(find ./{gamefixes-steam,gamefixes-amazon,gamefixes-gog,gamefixes-egs,gamefixes-humble,gamefixes-itchio,gamefixes-ubisoft,gamefixes-ulwgl,gamefixes-zoomplatform} -type f -name "*.py" ! -name "__init__.py" -print0) # Disable these checks: