[PATCH RSB v2 1/2] Add clean-cfg.sh script to find and remove unused cfg files

Gedare Bloom gedare at rtems.org
Sat Apr 4 20:14:35 UTC 2020


Updates #3273.
---
 clean-cfg.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 clean-cfg.sh

diff --git a/clean-cfg.sh b/clean-cfg.sh
new file mode 100644
index 0000000..eb3a82b
--- /dev/null
+++ b/clean-cfg.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+for f in `find . -name "*.cfg" -printf '%f\n' | sed -e 's/\.cfg//g'`
+do
+  grep -r $f > /dev/null
+  if [ ! $? -eq 0 ]
+  then
+    find . -name ${f}.cfg | xargs git rm
+  fi
+done
+
-- 
2.17.1



More information about the devel mailing list