27 lines
320 B
Bash
Executable File
27 lines
320 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
toml=Cargo.toml
|
|
name=eulerfunt
|
|
|
|
cat > $toml <<EOF
|
|
[package]
|
|
name = "$name"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
EOF
|
|
|
|
if ! [ -e ./src/p*.rs ]; then
|
|
exit 0
|
|
fi
|
|
|
|
for problem in ./src/p*.rs; do
|
|
file=${problem##*/}
|
|
bin=${file%.*}
|
|
cat >> $toml <<EOF
|
|
|
|
[[bin]]
|
|
name = "$bin"
|
|
path = "$problem"
|
|
EOF
|
|
done
|