summaryrefslogtreecommitdiffstats
path: root/ffdc
diff options
context:
space:
mode:
authorJayanth Othayoth <ojayanth@in.ibm.com>2017-07-09 21:18:32 -0500
committerJayanth Othayoth <ojayanth@in.ibm.com>2017-07-09 21:18:32 -0500
commit599c7afe0f90c1bb9b5cb9eda607150b562b8752 (patch)
tree758e2abe777ffeb0bfe4717b5b708c6ca3ef0aa7 /ffdc
parenta320c7cafcab3a967de9a1149a5e34e02699d382 (diff)
downloadphosphor-debug-collector-599c7afe0f90c1bb9b5cb9eda607150b562b8752.tar.gz
phosphor-debug-collector-599c7afe0f90c1bb9b5cb9eda607150b562b8752.zip
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>
Diffstat (limited to 'ffdc')
-rw-r--r--ffdc5
1 files changed, 3 insertions, 2 deletions
diff --git a/ffdc b/ffdc
index 7aafc76..3adf81c 100644
--- a/ffdc
+++ b/ffdc
@@ -43,10 +43,11 @@ while [[ $# -gt 0 ]]; do
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
OpenPOWER on IntegriCloud