Cleanup redundant code

This commit is contained in:
the Sane 2021-10-27 23:54:51 -04:00 committed by GitHub
parent 44bcbf8161
commit d5d7f75dde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -966,10 +966,6 @@ download_install() {
if [ "$num_dirs" -eq 0 ] && [ "$num_files" -eq 0 ]; then if [ "$num_dirs" -eq 0 ] && [ "$num_files" -eq 0 ]; then
# Sanity check # Sanity check
message warning "The downloaded archive is empty. There is nothing to do." message warning "The downloaded archive is empty. There is nothing to do."
# Cleanup tmp download
debug_print continue "Removing $tmp_dir/$download_file..."
rm "$tmp_dir/$download_file"
return 1
elif [ "$num_dirs" -eq 1 ] && [ "$num_files" -eq 0 ]; then elif [ "$num_dirs" -eq 1 ] && [ "$num_files" -eq 0 ]; then
# If the archive contains only one directory, install that directory # If the archive contains only one directory, install that directory
debug_print continue "Installing $download_type into $download_dir..." debug_print continue "Installing $download_type into $download_dir..."