diff --git a/crate/bevy_controls/example/basic/Cargo.toml b/crate/bevy_controls/example/basic/Cargo.toml deleted file mode 100644 index 2098f63..0000000 --- a/crate/bevy_controls/example/basic/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "basic" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/crate/bevy_controls/example/basic/src/main.rs b/crate/bevy_controls/example/basic/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/crate/bevy_controls/example/basic/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -} diff --git a/crate/bevy_controls/script/fetures-clippy.sh b/crate/bevy_controls/script/fetures-clippy.sh index 51467ec..91b0cbd 100644 --- a/crate/bevy_controls/script/fetures-clippy.sh +++ b/crate/bevy_controls/script/fetures-clippy.sh @@ -1,4 +1,41 @@ -features=$(grep '^\[features\]' $1 -A99999999 | grep '^\[' -m 2 -B99999999 | grep -v '^\[' | cut -d '=' -f 1 | grep -v 'default') +#!/bin/sh + +while [ "$#" -gt 0 ]; do + case $1 in + -h|-?|--help|help) + HELP=1 + ;; + -*) + echo "Error: Unsupported flag $1" >&2 + return 1 + ;; + *) # No more options + break + ;; + esac + shift +done + +if [ "$HELP" ]; then + printf "\ +usage %s \n + -?|-h|--help\tthis message +" "$(basename "$0")" + exit +fi + +CARGO_PATH="$1" + +if [ ! "$CARGO_PATH" ]; then + printf "please provide path to Cargo.toml\n" + exit +fi + +if [ -d "$CARGO_PATH" ]; then + CARGO_PATH="${CARGO_PATH}/Cargo.toml" +fi + +features=$(grep '^\[features\]' "$CARGO_PATH" -A99999999 | grep '^\[' -m 2 -B99999999 | grep -v '^\[' | cut -d '=' -f 1 | grep -v 'default') generate_combinations() { @@ -32,4 +69,4 @@ for ((i = 1; i <= $(wc -w <<< "$features"); ++i)); do exit 1 fi done -done \ No newline at end of file +done