Added client work scripts
[clearscm.git] / clients / LynuxWorks / bin / files4tag
diff --git a/clients/LynuxWorks/bin/files4tag b/clients/LynuxWorks/bin/files4tag
new file mode 100644 (file)
index 0000000..7a420ec
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+tag=$1
+file=""
+revision=""
+cvs -q log 2>/dev/null | grep -E "(Working file: |$tag)" | grep -B1 $tag |
+  while read line; do
+    if [[ $line == Working\ file:\ * ]]; then
+      file=$(echo $line | sed "s/Working file: //")
+    elif [[ $line == $tag* ]]; then
+      revision=$(echo $line | sed "s/$tag: //")
+    fi
+    if [ "$file" != "" -a "$revision" != "" ]; then
+      echo cvs update -r$revision $file
+      file=""
+      revision=""
+    fi
+  done