Add fix for ffdc tool -d option.
ffdc -d option expected to store the output in directory
specified by the user.
Fixed the incorrect behaviour in this option.
Change-Id: I2694c0a7d2050bd318aeb3792b96cb128d15ce82
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/ffdc b/ffdc
index 0b7cd67..7aafc76 100644
--- a/ffdc
+++ b/ffdc
@@ -64,7 +64,7 @@
echo "Using destination directory $dest"
-mkdir "$dest/$dir"
+mkdir -p "$dest/$dir"
for ((i=0;i<${#arr[@]};i+=2)); do
if [ -d "${arr[i+1]}" ]; then
@@ -77,7 +77,7 @@
fi
done
-tar -cf "$dir.tar" -C $dest $dir
+tar -cf "$dest/$dir.tar" -C $dest $dir
echo "Contents in $dest/$dir.tar"
rm -r "$dest/$dir"