mirror of
https://github.com/uutils/coreutils
synced 2025-01-05 17:59:00 +00:00
Merge pull request #5090 from starccy/fix-shell-script-style
"style(util): fix/format scripts to meet the `shellcheck`/`shfmt` rules"
This commit is contained in:
commit
e3f8f2ab25
4 changed files with 14 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# spell-checker:ignore xpass XPASS testsuite
|
# spell-checker:ignore xpass XPASS testsuite
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -67,9 +67,13 @@ function get_error {
|
||||||
echo $((NON_ROOT + AS_ROOT))
|
echo $((NON_ROOT + AS_ROOT))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# we don't need the return codes indeed, ignore them
|
||||||
|
# shellcheck disable=SC2155
|
||||||
|
{
|
||||||
export TOTAL=$(get_total)
|
export TOTAL=$(get_total)
|
||||||
export PASS=$(get_pass)
|
export PASS=$(get_pass)
|
||||||
export SKIP=$(get_skip)
|
export SKIP=$(get_skip)
|
||||||
export FAIL=$(get_fail)
|
export FAIL=$(get_fail)
|
||||||
export XPASS=$(get_xpass)
|
export XPASS=$(get_xpass)
|
||||||
export ERROR=$(get_error)
|
export ERROR=$(get_error)
|
||||||
|
}
|
||||||
|
|
|
@ -215,7 +215,6 @@ sed -i -e "s/provoked error./provoked error\ncat pat |sort -u > pat/" tests/misc
|
||||||
# Update the GNU error message to match ours
|
# Update the GNU error message to match ours
|
||||||
sed -i -e "s/link-to-dir: hard link not allowed for directory/failed to create hard link 'link-to-dir' =>/" -e "s|link-to-dir/: hard link not allowed for directory|failed to create hard link 'link-to-dir/' =>|" tests/ln/hard-to-sym.sh
|
sed -i -e "s/link-to-dir: hard link not allowed for directory/failed to create hard link 'link-to-dir' =>/" -e "s|link-to-dir/: hard link not allowed for directory|failed to create hard link 'link-to-dir/' =>|" tests/ln/hard-to-sym.sh
|
||||||
|
|
||||||
|
|
||||||
# GNU sleep accepts some crazy string, not sure we should match this behavior
|
# GNU sleep accepts some crazy string, not sure we should match this behavior
|
||||||
sed -i -e "s/timeout 10 sleep 0x.002p1/#timeout 10 sleep 0x.002p1/" tests/misc/sleep.sh
|
sed -i -e "s/timeout 10 sleep 0x.002p1/#timeout 10 sleep 0x.002p1/" tests/misc/sleep.sh
|
||||||
|
|
||||||
|
|
|
@ -47,4 +47,3 @@ sed -i -e "s|uucore = { version=\">=$FROM\",|uucore = { version=\">=$TO\",|" $PR
|
||||||
# Update crates using uucore_procs
|
# Update crates using uucore_procs
|
||||||
#shellcheck disable=SC2086
|
#shellcheck disable=SC2086
|
||||||
sed -i -e "s|uucore_procs = { version=\">=$FROM\",|uucore_procs = { version=\">=$TO\",|" $PROGS
|
sed -i -e "s|uucore_procs = { version=\">=$FROM\",|uucore_procs = { version=\">=$TO\",|" $PROGS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue