ffdc -d: enhancement
Create user specified ffdc location incase not present in the BMC.
Change-Id: If472ab34826b34037bc99cb978d5be77a51c30ec
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/ffdc b/ffdc
index 7aafc76..3adf81c 100644
--- a/ffdc
+++ b/ffdc
@@ -43,10 +43,11 @@
key="$1"
case $key in
-d|--dir)
- if [ -d "$2" ]; then
+ mkdir -p "$2"
+ if [ $? -eq 0 ]; then
dest="$2"
else
- echo "Invalid or no destination directory specified."
+ echo "Failed to create the destination directory specified."
break
fi
shift 2