mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
maint/polish ~ (util) shfmt -w -i=4 -ci
This commit is contained in:
parent
3a13857dc3
commit
fdd11e0637
4 changed files with 23 additions and 20 deletions
|
@ -12,7 +12,7 @@ ME_dir="$(dirname -- "$(readlink -fm -- "$0")")"
|
||||||
REPO_main_dir="$(dirname -- "${ME_dir}")"
|
REPO_main_dir="$(dirname -- "${ME_dir}")"
|
||||||
|
|
||||||
cd "${REPO_main_dir}" &&
|
cd "${REPO_main_dir}" &&
|
||||||
echo "[ \"$PWD\" ]"
|
echo "[ \"$PWD\" ]"
|
||||||
|
|
||||||
#shellcheck disable=SC2086
|
#shellcheck disable=SC2086
|
||||||
UTIL_LIST=$("${ME_dir}"/show-utils.sh ${FEATURES_OPTION})
|
UTIL_LIST=$("${ME_dir}"/show-utils.sh ${FEATURES_OPTION})
|
||||||
|
@ -32,7 +32,8 @@ export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Co
|
||||||
export RUSTDOCFLAGS="-Cpanic=abort"
|
export RUSTDOCFLAGS="-Cpanic=abort"
|
||||||
export RUSTUP_TOOLCHAIN="nightly-gnu"
|
export RUSTUP_TOOLCHAIN="nightly-gnu"
|
||||||
#shellcheck disable=SC2086
|
#shellcheck disable=SC2086
|
||||||
{ cargo build ${FEATURES_OPTION}
|
{
|
||||||
|
cargo build ${FEATURES_OPTION}
|
||||||
cargo test --no-run ${FEATURES_OPTION}
|
cargo test --no-run ${FEATURES_OPTION}
|
||||||
cargo test --quiet ${FEATURES_OPTION}
|
cargo test --quiet ${FEATURES_OPTION}
|
||||||
cargo test --quiet ${FEATURES_OPTION} ${CARGO_INDIVIDUAL_PACKAGE_OPTIONS}
|
cargo test --quiet ${FEATURES_OPTION} ${CARGO_INDIVIDUAL_PACKAGE_OPTIONS}
|
||||||
|
@ -55,4 +56,4 @@ 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
|
||||||
if [ $? -ne 0 ]; then exit 1 ; fi
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
|
@ -6,8 +6,9 @@ if test "$1" != "--do-it"; then
|
||||||
ARG="--dry-run --allow-dirty"
|
ARG="--dry-run --allow-dirty"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for dir in src/uucore/ src/uucore_procs/ src/uu/stdbuf/src/libstdbuf/ ; do
|
for dir in src/uucore/ src/uucore_procs/ src/uu/stdbuf/src/libstdbuf/; do
|
||||||
( cd "$dir"
|
(
|
||||||
|
cd "$dir"
|
||||||
#shellcheck disable=SC2086
|
#shellcheck disable=SC2086
|
||||||
cargo publish $ARG
|
cargo publish $ARG
|
||||||
)
|
)
|
||||||
|
@ -16,7 +17,8 @@ done
|
||||||
|
|
||||||
PROGS=$(ls -1d src/uu/*/)
|
PROGS=$(ls -1d src/uu/*/)
|
||||||
for p in $PROGS; do
|
for p in $PROGS; do
|
||||||
( cd "$p"
|
(
|
||||||
|
cd "$p"
|
||||||
#shellcheck disable=SC2086
|
#shellcheck disable=SC2086
|
||||||
cargo publish $ARG
|
cargo publish $ARG
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,9 +7,9 @@ REPO_main_dir="$(dirname -- "${ME_dir}")"
|
||||||
|
|
||||||
export COVERAGE_REPORT_DIR="${REPO_main_dir}/target/debug/coverage-nix"
|
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
|
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
|
||||||
|
|
|
@ -17,11 +17,11 @@ project_main_dir="${ME_parent_dir_abs}"
|
||||||
# printf 'project_main_dir="%s"\n' "${project_main_dir}"
|
# printf 'project_main_dir="%s"\n' "${project_main_dir}"
|
||||||
cd "${project_main_dir}" &&
|
cd "${project_main_dir}" &&
|
||||||
|
|
||||||
# `jq` available?
|
# `jq` available?
|
||||||
if ! jq --version 1>/dev/null 2>&1; then
|
if ! jq --version 1>/dev/null 2>&1; then
|
||||||
echo "WARN: missing \`jq\` (install with \`sudo apt install jq\`); falling back to default (only fully cross-platform) utility list" 1>&2
|
echo "WARN: missing \`jq\` (install with \`sudo apt install jq\`); falling back to default (only fully cross-platform) utility list" 1>&2
|
||||||
echo "$default_utils"
|
echo "$default_utils"
|
||||||
else
|
else
|
||||||
cargo metadata "$*" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string | sub(\"^uu_\"; \"\")] | sort | join(\" \")"
|
cargo metadata "$*" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string | sub(\"^uu_\"; \"\")] | sort | join(\" \")"
|
||||||
# cargo metadata "$*" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string] | sort | join(\" \")"
|
# cargo metadata "$*" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string] | sort | join(\" \")"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue