Introduce pdrdump.sh

This script will walk the PDR repository using the pldmtool
and print all of the PDR details output to a text file.

Signed-off-by: Christian Geddes <crgeddes@us.ibm.com>
Change-Id: I413085b7e162085ca3f2ddde6e08d606bac7d100
diff --git a/pldm/pdrdump.sh b/pldm/pdrdump.sh
new file mode 100755
index 0000000..45d7598
--- /dev/null
+++ b/pldm/pdrdump.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+pdrdump_file=$1
+printf "Dumping PDRs to $pdrdump_file ..."
+i=0
+done=0
+while [ $done -eq 0 ]
+do
+    echo "pldmtool platform GetPDR -d $i" >> $pdrdump_file
+    pldmtool platform GetPDR -d $i >> $pdrdump_file
+    i=`grep nextRecordHandle $pdrdump_file | tail -n1 | awk '{print $2}'`
+    i=${i::-1}
+    if [ $i -eq 0 ]; then done=1; fi
+done
+printf " Complete!\n"
\ No newline at end of file