-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Whole script is changed/adapted/improved for better handling and better result - Use 'retain' input key to force retain your preferred program Read more on README.md file Signed-off-by: rokibhasansagar <[email protected]>
- Loading branch information
1 parent
2d35595
commit 5839b6f
Showing
6 changed files
with
703 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
cd $(mktemp -d) || exit | ||
echo "::group:: Environment Variables" | ||
printenv | sort | tee -a env.vars.${state}.${wf_os}.list | ||
echo "::endgroup::" | ||
echo "::group:: Disk Space" | ||
df --sync -BM -T -a | tee -a disk.usage.${state}.${wf_os}.list | ||
echo "::endgroup::" | ||
echo "::group:: apt List Area" | ||
sudo apt list --installed | sed '1d' | tee -a apt.installed.${state}.${wf_os}.list | ||
echo "::endgroup::" | ||
echo "::group:: dpkg-query Debug Area" | ||
dpkg-query -Wf 'Package: ${Package}\nSynopsis: ${binary:Summary}\nVersion: ${Version}\nSizeInKB: ${Installed-Size}\nPre-Depends: ${Pre-Depends}\nDepends: ${Depends}\n\n' | sed -e '/^Synopsis: $/d;/^Version: $/d;/^SizeInKB: $/d;/^Pre-Depends: $/d;/^Depends: $/d' | tee -a apt.dependencies.${state}.${wf_os}.list | ||
echo "::endgroup::" | ||
echo "::group:: Storage-hungry APT Packages dpkg-query Debug Area" | ||
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rh 2>/dev/null | head -n30 | awk '{print $2}' >apt.hugeapps.names.${state}.${wf_os}.list | ||
cat apt.hugeapps.names.${state}.${wf_os}.list | while read -r i; do | ||
dpkg-query -f='Package: ${Package}\nSynopsis: ${binary:Summary}\nVersion: ${Version}\nSizeInKB: ${Installed-Size}\nPre-Depends: ${Pre-Depends}\nDepends: ${Depends}\n\n' -W "${i}" | sed -e '/^Synopsis: $/d;/^Version: $/d;/^SizeInKB: $/d;/^Pre-Depends: $/d;/^Depends: $/d' | tee -a apt.hugeappsdependencies.${state}.${wf_os}.list | ||
done | ||
echo "::endgroup::" | ||
echo "::group:: Bin Debug Area" | ||
ls -lAog /usr/local/bin 2>&1 | tee -a bin.local.${state}.${wf_os}.list | ||
ls -lAog /usr/bin 2>&1 | tee -a bin.global.${state}.${wf_os}.list | ||
echo "::endgroup::" | ||
echo "::group:: Directory List Debug Area" | ||
ls -lAog ~/.* 2>/dev/null | tee -a dotfiles.${state}.${wf_os}.list || true | ||
tree -a -h -I "*.py|__pycache__|*.h|*.dll|*.git" -L 4 /opt/ 2>/dev/null >tree.opt.${state}.${wf_os}.list || true | ||
tree -a -h -I "*.py|__pycache__|*.h|*.dll|*.git" -L 3 /usr/share/ 2>/dev/null >tree.usr.share.${state}.${wf_os}.list || true | ||
tree -a -h -I "*.py|__pycache__|*.h|*.dll|*.git" -L 3 /usr/local/ 2>/dev/null >tree.usr.local.${state}.${wf_os}.list || true | ||
tree -a -h -I "*.py|__pycache__|*.h|*.dll|*.git" -L 3 /usr/local/share/ 2>/dev/null >tree.usr.local.share.${state}.${wf_os}.list || true | ||
tree -a -h -I "*.py|__pycache__|*.h|*.dll|*.git" -L 2 /etc/ 2>/dev/null >tree.etc.${state}.${wf_os}.list || true | ||
tree -a -h -I "*.py|__pycache__|*.h|*.dll|*.git" -L 3 /home/runner/ 2>/dev/null >tree.home.${state}.${wf_os}.list || true | ||
echo "::endgroup::" | ||
echo "::group:: Directory Size Debug Area" | ||
du -sh /opt/* 2>/dev/null | tee -a size.opt.${state}.${wf_os}.list || true | ||
du -sh /usr/share/* 2>/dev/null | tee -a size.usr.share.${state}.${wf_os}.list | ||
du -sh /usr/local/* 2>/dev/null | tee -a size.usr.local.${state}.${wf_os}.list | ||
du -sh /usr/local/share/* 2>/dev/null | tee -a size.usr.local.share.${state}.${wf_os}.list | ||
du -sh /etc/* 2>/dev/null | tee -a size.etc.${state}.${wf_os}.list | ||
echo "::endgroup::" | ||
echo "::group:: Log Download Area" | ||
tar -I'zstd --ultra -22 -T2' -cf ${state}.${wf_os}.lists.tzst *.${state}.${wf_os}.list | ||
rm *.${state}.${wf_os}.list | ||
curl -s --upload-file ${state}.${wf_os}.lists.tzst https://transfer.sh/ && echo | ||
echo "::endgroup::" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.