summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/check-binary-names14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/check-binary-names b/scripts/check-binary-names
new file mode 100644
index 00000000..075c0736
--- /dev/null
+++ b/scripts/check-binary-names
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+for file in `find bin -type f -name Cargo.toml -o -name main.rs -o -name ui.rs`;
+do
+ echo "$file" | grep Cargo.toml > /dev/null 2>/dev/null && {
+ name=$(cat $file | grep description | sed 's,.*: ,,; s, .*,,')
+
+ echo "$file" | grep "$name" > /dev/null 2>/dev/null || {
+ echo "Crate in $file is named $name"
+ exit 1
+ }
+ }
+
+done