mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-23 04:52:28 +00:00
ci: make the rustfmt.sh script ash-compatible
This commit is contained in:
parent
44e2f0317c
commit
9e65540cd8
1 changed files with 10 additions and 4 deletions
|
@ -1,11 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/busybox ash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
rustfmt=${RUSTFMT:-rustfmt}
|
rustfmt=${RUSTFMT:-rustfmt}
|
||||||
version="$($rustfmt -V)"
|
version="$($rustfmt -V)"
|
||||||
if [[ $version != *nightly* ]]; then
|
case "$version" in
|
||||||
|
*nightly*)
|
||||||
|
# all good, no additional flags required
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# assume we're using some sort of rustup setup
|
||||||
rustfmt="$rustfmt +nightly"
|
rustfmt="$rustfmt +nightly"
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
return=0
|
return=0
|
||||||
find "$(dirname "$0")" -name '*.rs' -type f | while read file; do
|
find "$(dirname "$0")" -name '*.rs' -type f | while read file; do
|
||||||
|
|
Loading…
Add table
Reference in a new issue