Skip to content

Commit

Permalink
Update files.am: add notes on
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-hc authored Aug 8, 2024
1 parent 6f29f8e commit 2c7c8e2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules/files.am
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ _files_show_only_number() {
exit 0
}

_files_appimage_type_notes() {
if grep -q "appimage" "$AMCACHEDIR"/files*; then
if grep -q "appimage2" "$AMCACHEDIR"/files*; then
printf " *appimage2 needs libfuse2 and fusermount installed\n"
fi
if grep -q "appimage3" "$AMCACHEDIR"/files*; then
printf " *appimage3 does not need libfuse but needs fusermount3 or higher\n"
fi
printf "\n"
fi
}

_files_total_size() {
if [ "$(_files_show_only_number)" = "0" ]; then
printf "\n 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\n\n"
Expand All @@ -157,6 +169,7 @@ _files_sort_by_name() {
sort "$AMCACHEDIR"/files-args 2>/dev/null >> "$AMCACHEDIR"/files-args-byname
column -t "$AMCACHEDIR"/files-args-byname
_files_total_size
_files_appimage_type_notes
}

_files_sort_by_size() {
Expand All @@ -168,6 +181,7 @@ _files_sort_by_size() {
cat "$AMCACHEDIR"/files-args >> "$AMCACHEDIR"/files-args-bysize 2>/dev/null
column -t "$AMCACHEDIR"/files-args-bysize
_files_total_size
_files_appimage_type_notes
}

if [ "$2" = "--less" ]; then
Expand Down

0 comments on commit 2c7c8e2

Please sign in to comment.