diff --git a/rclone.sh b/rclone.sh index 1f0d3b6..d6e0232 100644 --- a/rclone.sh +++ b/rclone.sh @@ -33,7 +33,7 @@ function gzipVMbackups { # create the tar and pipe into pigz for multi-threaded gzip tar cf - "${base}" | pigz > "${dir%/}.gz" # if the tar/gzip was successful, delete the backup directory - if [[ $? -eq 0 ]] && [[ -f "${dir%/}.gz" ]]; then + if [ $? -eq 0 ] && [ -f "${dir%/}.gz" ]; then rm -rf "${dir}" fi done