#!/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 clippy --all-features $(printf -- "--target %s " ${runs[@]})
cd src-tauri
cargo clippy --all-features $(printf -- "--target %s " ${runs[@]})
cd ../../config
cargo clippy --all-features $(printf -- "--target %s " ${runs[@]})
cd ../data
cargo clippy --all-features $(printf -- "--target %s " ${runs[@]})
cd ../victim
payload="../build.rs" cargo clippy --all-features $(printf -- "--target %s " ${runs[@]})
