mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
maint/util ~ fix shellcheck
complaints
This commit is contained in:
parent
fdd11e0637
commit
a970c8d45d
2 changed files with 16 additions and 1 deletions
|
@ -56,4 +56,5 @@ if genhtml --version 2>/dev/null 1>&2; then
|
||||||
else
|
else
|
||||||
grcov . --output-type html --output-path "${COVERAGE_REPORT_DIR}" --branch --ignore build.rs --ignore '/*' --ignore '[A-Za-z]:/*' --ignore 'C:/Users/*' --excl-br-line '^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()'
|
grcov . --output-type html --output-path "${COVERAGE_REPORT_DIR}" --branch --ignore build.rs --ignore '/*' --ignore '[A-Za-z]:/*' --ignore 'C:/Users/*' --excl-br-line '^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()'
|
||||||
fi
|
fi
|
||||||
|
# shellcheck disable=SC2181
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
|
@ -9,7 +9,21 @@ export COVERAGE_REPORT_DIR="${REPO_main_dir}/target/debug/coverage-nix"
|
||||||
|
|
||||||
if ! "${ME_dir}/build-code_coverage.sh"; then exit 1; fi
|
if ! "${ME_dir}/build-code_coverage.sh"; then exit 1; fi
|
||||||
|
|
||||||
case ";$OSID_tags;" in
|
# WSL?
|
||||||
|
if [ -z "${OSID_tags}" ]; then
|
||||||
|
if [ -e '/proc/sys/fs/binfmt_misc/WSLInterop' ] && (grep '^enabled$' '/proc/sys/fs/binfmt_misc/WSLInterop' >/dev/null); then
|
||||||
|
__="wsl"
|
||||||
|
case ";${OSID_tags};" in ";;") OSID_tags="$__" ;; *";$__;"*) ;; *) OSID_tags="$__;$OSID_tags" ;; esac
|
||||||
|
unset __
|
||||||
|
# Windows version == <major>.<minor>.<build>.<revision>
|
||||||
|
# Release ID; see [Release ID/Version vs Build](https://winreleaseinfoprod.blob.core.windows.net/winreleaseinfoprod/en-US.html)[`@`](https://archive.is/GOj1g)
|
||||||
|
OSID_wsl_build="$(uname -r | sed 's/^[0-9.][0-9.]*-\([0-9][0-9]*\)-.*$/\1/g')"
|
||||||
|
OSID_wsl_revision="$(uname -v | sed 's/^#\([0-9.][0-9.]*\)-.*$/\1/g')"
|
||||||
|
export OSID_wsl_build OSID_wsl_revision
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
case ";${OSID_tags};" in
|
||||||
*";wsl;"*) powershell.exe -c "$(wslpath -w "${COVERAGE_REPORT_DIR}"/index.html)" ;;
|
*";wsl;"*) powershell.exe -c "$(wslpath -w "${COVERAGE_REPORT_DIR}"/index.html)" ;;
|
||||||
*) xdg-open --version >/dev/null 2>&1 && xdg-open "${COVERAGE_REPORT_DIR}"/index.html || echo "report available at '\"${COVERAGE_REPORT_DIR}\"/index.html'" ;;
|
*) xdg-open --version >/dev/null 2>&1 && xdg-open "${COVERAGE_REPORT_DIR}"/index.html || echo "report available at '\"${COVERAGE_REPORT_DIR}\"/index.html'" ;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue