Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix total size, by @Azathothas #1185

Merged
merged 1 commit into from
Dec 3, 2024
Merged

Fix total size, by @Azathothas #1185

merged 1 commit into from
Dec 3, 2024

Conversation

ivan-hc
Copy link
Owner

@ivan-hc ivan-hc commented Dec 3, 2024

No description provided.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@ivan-hc ivan-hc merged commit b176970 into dev Dec 3, 2024
printf "\n"
command -v aisap >/dev/null 2>&1 && printf '%s\n\n' " AppImages with 🔒 are sandboxed with aisap"
TOTAL_SIZE=$(echo "$ARGPATHS" | grep "^$APPSPATH" | du -ch 2>/dev/null | grep "total" | awk 'END {print $1"iB"}' | sed 's/...$/ &/')
TOTAL_SIZE=$(du -shc $(find "$APPSPATH" -maxdepth 2 -type f -name 'remove' -printf "%h\n" 2>/dev/null) | tail -n1 | awk 'END {print $1"iB"}' | sed 's/...$/ &/')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all you people ended up doing was add a 2>/dev/null to the original find lol.

@Azathothas was telling that this was unsafe (which I don't see how) but put it back anyway?

printf "\n"
command -v aisap >/dev/null 2>&1 && printf '%s\n\n' " AppImages with 🔒 are sandboxed with aisap"
TOTAL_SIZE=$(echo "$ARGPATHS" | grep "^$APPSPATH" | du -ch 2>/dev/null | grep "total" | awk 'END {print $1"iB"}' | sed 's/...$/ &/')
TOTAL_SIZE=$(du -shc $(find "$APPSPATH" -maxdepth 2 -type f -name 'remove' -printf "%h\n" 2>/dev/null) | tail -n1 | awk 'END {print $1"iB"}' | sed 's/...$/ &/')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I don't think the tail -n1 is needed since the END in awk does the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants