#!/bin/bash # SYSTEM: CONFIG Empty Trash (rm all deleted config profiles in trash can) # Get number of files in folder TRASH_FILES_COUNT=$(ls "$CONFIG_DIRECTORY/trash/" | wc -l) # Delete Routine if [[ "$TRASH_FILES_COUNT" == 0 ]] then echo -e "[x] Empty Trash (deleted config files): Trash empty / no files to delete." echo -e "" elif [[ "$TRASH_FILES_COUNT" == 1 ]] then sudo rm -r "$CONFIG_DIRECTORY/trash/"* confirmation_message "[x] Empty Trash (deleted config files): Completed. $TRASH_FILES_COUNT file deleted." echo -e "" else sudo rm -r "$CONFIG_DIRECTORY/trash/"* confirmation_message "[x] Empty Trash (deleted config files): Completed. $TRASH_FILES_COUNT files deleted." echo -e "" fi