Skip to content

Commit

Permalink
Update database.am: refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-hc authored Sep 1, 2024
1 parent 272c81d commit f25c8c0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions modules/database.am
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,8 @@ _files_appimage_type_notes() {

_files_total_size() {
printf "\n"
if [ "$(_files_show_only_number)" = "0" ]; then
echo " TOTAL SIZE: $(du -ch $(find . -type d -name 'modules' -printf "%h\n") 2>/dev/null | awk 'END {print $1"iB"}' | sed 's/...$/ &/') of disk space in use"
else
command -v aisap >/dev/null 2>&1 && printf '%s\n\n' " AppImages with 🔒 are sandboxed with aisap"
echo " TOTAL SIZE: $(du -ch $(find . -type f -name 'remove' -printf "%h\n") 2>/dev/null | awk 'END {print $1"iB"}' | sed 's/...$/ &/') of disk space in use"
fi
command -v aisap >/dev/null 2>&1 && printf '%s\n\n' " AppImages with 🔒 are sandboxed with aisap"
echo " TOTAL SIZE: $(find . -type f -name 'remove' -printf "%h\n" | du -ch */ 2>/dev/null | awk 'END {print $1"iB"}' | sed 's/...$/ &/') of disk space in use"
printf "\n"
}

Expand Down Expand Up @@ -268,7 +264,7 @@ _list() {
# Check if github.com is online, if not, the function will read the offline list
wget -q --tries=10 --timeout=20 --spider https://github.com && _completion_lists
# Check the number of installed apps and libraries
LIBNUMBER=$(grep "usr/local/lib" "$APPSPATH"/*/remove 2> /dev/null | wc -l)
LIBNUMBER=$(grep -c "usr/local/lib" "$APPSPATH"/*/remove 2> /dev/null)
ITEMSNUMBER=$(cd "$APPSPATH" && find . -name 'remove' -printf "%h\n" 2>/dev/null | sort -u | wc -l)
if [ "$AMCLI" = am ]; then
if test -f /opt/am/remove; then
Expand Down

0 comments on commit f25c8c0

Please sign in to comment.