wow. that was easy: git mv core nucleus
[feisty_meow.git] / nucleus / tools / solution_solvers / extract_projects.sh
diff --git a/nucleus/tools/solution_solvers/extract_projects.sh b/nucleus/tools/solution_solvers/extract_projects.sh
new file mode 100644 (file)
index 0000000..c36525c
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# this is a simple script that finds the project files listed in a solution file.
+
+solution_name="$1"; shift
+if [ -z "$solution_name" ]; then
+  echo This script needs a solution or project file name.  It will locate all the
+  echo projects listed in that file.
+  exit 3
+fi
+
+grep -i proj "$solution_name" | sed -n -e 's/.*"\([^"]*proj\)".*/\1/p' | sed -e 's/.*[\\\/]\([^\\\/]*\)/\1/' | tr A-Z a-z | sort | uniq
+