Closed unkcpz closed 6 months ago
Hey can I work on this?
Sure, please go ahead. Pinging me if you need a review or help :)
#!/bin/bash
# Get user input for the command, source folder, and destination folder
read -p "Enter the command for dumping/archiving: " custom_command
read -p "Enter the source folder: " source_folder
read -p "Enter the destination folder: " destination_folder
if [ ! -d "$destination_folder" ]; then
mkdir -p "$destination_folder"
fi
if [ -d "$destination_folder" ]; then
# Execute the user-provided command with source and destination folders
eval "$custom_command" "$source_folder" "$destination_folder"
else
echo "Failed to create destination folder or it does not exist. Exiting..."
exit 1
fi
I think this will resolve the bug. I am not sure
@unkcpz Please help me with that.
When dumping data to the archive with
verdi archive create
, it takes hours to create theexport.zip
but the command failed because of the dst folder does not exist. It'll be very helpful if the check can happen before or automatically create a folder withmkdir -p
.