Skip to content

Commit

Permalink
[+] Bloat Removal by default? (40%)
Browse files Browse the repository at this point in the history
  • Loading branch information
Azathothas committed Sep 7, 2024
1 parent 1bf603a commit 6224aef
Show file tree
Hide file tree
Showing 18 changed files with 366 additions and 58 deletions.
17 changes: 17 additions & 0 deletions .github/scripts/aarch64_Linux/bins/firefox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then
##Desktop
find "." -path '*firefox*.desktop' | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1 | xargs -I {} sh -c 'cp {} "./firefox.desktop"'
sed 's/Icon=[^ ]*/Icon=firefox/' -i "./firefox.desktop" 2>/dev/null
##Purge Bloatware
echo -e "\n[+] Purging Bloatware...\n"
O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}"
#Headers
find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#docs & manpages
find "." -type d -path "*doc/share*" ! -name "*firefox*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/docs*" ! -name "*firefox*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/man*" ! -name "*firefox*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#static libs
find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null
#systemd (need .so)
find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \;
#Strip (this breaks things)
#find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null
P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}"
echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n"
#(Re)Pack
cd "${OWD}"
curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/aarch64_Linux/bins/helix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then
##Desktop
find "." -path '*helix*.desktop' | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1 | xargs -I {} sh -c 'cp {} "./helix.desktop"'
sed 's/Icon=[^ ]*/Icon=helix/' -i "./helix.desktop" 2>/dev/null
##Purge Bloatware
echo -e "\n[+] Purging Bloatware...\n"
O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}"
#Headers
find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#docs & manpages
find "." -type d -path "*doc/share*" ! -name "*helix*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/docs*" ! -name "*helix*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/man*" ! -name "*helix*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#static libs
find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null
#systemd (need .so)
find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \;
#Strip (this breaks things)
#find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null
P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}"
echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n"
#(Re)Pack
cd "${OWD}"
curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/aarch64_Linux/bins/kitty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then
##Desktop
find "." -path '*kitty*.desktop' | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1 | xargs -I {} sh -c 'cp {} "./kitty.desktop"'
sed 's/Icon=[^ ]*/Icon=kitty/' -i "./kitty.desktop" 2>/dev/null
##Purge Bloatware
echo -e "\n[+] Purging Bloatware...\n"
O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}"
#Headers
find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#docs & manpages
find "." -type d -path "*doc/share*" ! -name "*kitty*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/docs*" ! -name "*kitty*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/man*" ! -name "*kitty*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#static libs
find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null
#systemd (need .so)
find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \;
#Strip (this breaks things)
#find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null
P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}"
echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n"
#(Re)Pack
cd "${OWD}"
curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/aarch64_Linux/bins/ladybird.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then
##Desktop
echo -e "[Desktop Entry]\nVersion=1.0\nName=Ladybird\nComment=Ladybird is an ongoing project to build an independent web browser from scratch\nExec=ladybird\nIcon=ladybird\nType=Application\nCategories=Network;WebBrowser;\nMimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;\nStartupNotify=true" > "./ladybird.desktop"
sed 's/Icon=[^ ]*/Icon=ladybird/' -i "./ladybird.desktop" 2>/dev/null
##Purge Bloatware
echo -e "\n[+] Purging Bloatware...\n"
O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}"
#Headers
find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#docs & manpages
find "." -type d -path "*doc/share*" ! -name "*ladybird*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/docs*" ! -name "*ladybird*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/man*" ! -name "*ladybird*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#static libs
find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null
#systemd (need .so)
find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \;
#Strip (this breaks things)
#find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null
P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}"
echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n"
#(Re)Pack
cd "${OWD}"
curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/aarch64_Linux/bins/lorien.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then
##Desktop
find "." -path '*lorien*.desktop' | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1 | xargs -I {} sh -c 'cp {} "./lorien.desktop"'
sed 's/Icon=[^ ]*/Icon=lorien/' -i "./lorien.desktop" 2>/dev/null
##Purge Bloatware
echo -e "\n[+] Purging Bloatware...\n"
O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}"
#Headers
find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#docs & manpages
find "." -type d -path "*doc/share*" ! -name "*lorien*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/docs*" ! -name "*lorien*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/man*" ! -name "*lorien*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#static libs
find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null
#systemd (need .so)
find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \;
#Strip (this breaks things)
#find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null
P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}"
echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n"
#(Re)Pack
cd "${OWD}"
curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/aarch64_Linux/bins/mpv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then
##Desktop
find "." -path '*mpv*.desktop' | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1 | xargs -I {} sh -c 'cp {} "./mpv.desktop"'
sed 's/Icon=[^ ]*/Icon=mpv/' -i "./mpv.desktop" 2>/dev/null
##Purge Bloatware
echo -e "\n[+] Purging Bloatware...\n"
O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}"
#Headers
find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#docs & manpages
find "." -type d -path "*doc/share*" ! -name "*mpv*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/docs*" ! -name "*mpv*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/man*" ! -name "*mpv*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#static libs
find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null
#systemd (need .so)
find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \;
#Strip (this breaks things)
#find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null
P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}"
echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n"
#(Re)Pack
cd "${OWD}"
curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/aarch64_Linux/bins/netsurf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then
##Desktop
echo -e "[Desktop Entry]\nVersion=1.0\nName=netsurf-browser\nComment=Small as a mouse, fast as a cheetah and available for free. NetSurf is a multi-platform web browser for RISC OS, UNIX-like platforms (including Linux), Mac OS X, and more.\nExec=netsurf\nIcon=netsurf\nType=Application\nCategories=Network;WebBrowser;\nMimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;\nStartupNotify=true" > "./netsurf.desktop"
sed 's/Icon=[^ ]*/Icon=netsurf/' -i "./netsurf.desktop" 2>/dev/null
##Purge Bloatware
echo -e "\n[+] Purging Bloatware...\n"
O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}"
#Headers
find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#docs & manpages
find "." -type d -path "*doc/share*" ! -name "*netsurf*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/docs*" ! -name "*netsurf*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/man*" ! -name "*netsurf*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#static libs
find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null
#systemd (need .so)
find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \;
#Strip (this breaks things)
#find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null
P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}"
echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n"
#(Re)Pack
cd "${OWD}"
curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/aarch64_Linux/bins/nicotine-plus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then
##Desktop
find "." -path '*nicotine*.desktop' | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1 | xargs -I {} sh -c 'cp {} "./nicotine-plus.desktop"'
sed 's/Icon=[^ ]*/Icon=nicotine-plus/' -i "./nicotine-plus.desktop" 2>/dev/null
##Purge Bloatware
echo -e "\n[+] Purging Bloatware...\n"
O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}"
#Headers
find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#docs & manpages
find "." -type d -path "*doc/share*" ! -name "*nicotine*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/docs*" ! -name "*nicotine*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/man*" ! -name "*nicotine*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#static libs
find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null
#systemd (need .so)
find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \;
#Strip (this breaks things)
#find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null
P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}"
echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n"
#(Re)Pack
cd "${OWD}"
curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/aarch64_Linux/bins/ppsspp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then
##Desktop
find "." -path '*ppsspp*.desktop' | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1 | xargs -I {} sh -c 'cp {} "./ppsspp.desktop"'
sed 's/Icon=[^ ]*/Icon=ppsspp/' -i "./ppsspp.desktop" 2>/dev/null
##Purge Bloatware
echo -e "\n[+] Purging Bloatware...\n"
O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}"
#Headers
find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#docs & manpages
find "." -type d -path "*doc/share*" ! -name "*ppsspp*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/docs*" ! -name "*ppsspp*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/man*" ! -name "*ppsspp*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#static libs
find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null
#systemd (need .so)
find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \;
#Strip (this breaks things)
#find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null
P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}"
echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n"
#(Re)Pack
cd "${OWD}"
curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"
Expand Down
17 changes: 17 additions & 0 deletions .github/scripts/x86_64_Linux/bins/firefox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then
##Desktop
find "." -path '*firefox*.desktop' | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1 | xargs -I {} sh -c 'cp {} "./firefox.desktop"'
sed 's/Icon=[^ ]*/Icon=firefox/' -i "./firefox.desktop" 2>/dev/null
##Purge Bloatware
echo -e "\n[+] Purging Bloatware...\n"
O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}"
#Headers
find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#docs & manpages
find "." -type d -path "*doc/share*" ! -name "*firefox*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/docs*" ! -name "*firefox*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
find "." -type d -path "*/share/man*" ! -name "*firefox*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null
#static libs
find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null
#systemd (need .so)
find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \;
#Strip (this breaks things)
#find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null
P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}"
echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n"
#(Re)Pack
cd "${OWD}"
curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"
Expand Down
Loading

0 comments on commit 6224aef

Please sign in to comment.