mirror of https://github.com/ctz/rustls
Add fmt script to admin dir
This commit is contained in:
parent
be6c221271
commit
9ceff5e988
|
@ -4,3 +4,4 @@ target/
|
|||
*.gcno
|
||||
*.info
|
||||
sslkeylogfile.txt
|
||||
admin/rustfmt
|
||||
|
|
|
@ -5,3 +5,4 @@ members = [
|
|||
# tests and example code that depend on mio
|
||||
"rustls-mio",
|
||||
]
|
||||
exclude = ["admin/rustfmt"]
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
set -xe
|
||||
|
||||
ADMIN=$(dirname "$0")
|
||||
PREV=$(pwd)
|
||||
if [ ! -d $ADMIN/rustfmt ] ; then
|
||||
git clone --depth 1 https://github.com/rust-lang/rustfmt $ADMIN/rustfmt
|
||||
fi
|
||||
|
||||
if [ ! -x $ADMIN/rustfmt/target/release/cargo-fmt ] ; then
|
||||
cd $ADMIN/rustfmt
|
||||
export CFG_RELEASE=nightly
|
||||
export CFG_RELEASE_CHANNEL=nightly
|
||||
cargo build --release --features rustfmt,cargo-fmt
|
||||
fi
|
||||
|
||||
cd $PREV
|
||||
PATH=$ADMIN/rustfmt/release/:$PATH cargo-fmt
|
Loading…
Reference in New Issue