#!/bin/sh
set -xe
runs=("x86_64-pc-windows-gnu" "x86_64-unknown-linux-gnu")
for i in ${runs[@]}
do
rustup target add $i &> /dev/null
done
cd command
cargo fmt
cargo clippy --all-features $(printf -- "--target %s " ${runs[@]})
cd src-tauri
cargo fmt
cargo clippy --all-features $(printf -- "--target %s " ${runs[@]})
cd ../../config
cargo fmt
cargo clippy --all-features $(printf -- "--target %s " ${runs[@]})
cd ../data
cargo fmt
cargo clippy --all-features $(printf -- "--target %s " ${runs[@]})
cd ../victim
cargo fmt
payload="../build.rs" cargo clippy --all-features $(printf -- "--target %s " ${runs[@]})