logo

deblob

remove binary executables from a directory git clone https://hacktivis.me/git/deblob.git
commit: db49251a38ab2f3805aa771b39e0abe3d59b63cc
parent d04d7453e1e43b5a514241e49bc3bf26cd1273d0
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue,  4 Oct 2022 05:57:38 +0200

deblob.1: Update /etc/portage/bashrc example

Diffstat:

Mdeblob.115+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/deblob.1 b/deblob.1 @@ -62,12 +62,19 @@ WASM (Web Assembly) Apple Preferred Executable Format .El .Sh EXAMPLES -The following code block show how it is intended to be used in Gentoo's +The following code block shows how it can be used in Gentoo's .Pa /etc/portage/bashrc : .Bd -literal -if [ "${EBUILD_PHASE}" == "prepare" ] -then - deblob -e 'test*' -e '*/test*' -d "${WORKDIR}" +# Will be ran before configure phase, allowing ebuilds to delete blobs themselves in the prepare phase +if [ "${EBUILD_PHASE}" == "configure" ]; then + if grep -q -- '-bin$' <<<"${PN}"; then + echo ":: *-bin package, not deblobbing" + elif grep -q -- "${PN}" /etc/portage/deblob.reject; then + echo ":: package is in /etc/portage/deblob.reject, no removals" + time deblob -n -e 'test*' -e '*/test*' -d "${WORKDIR}" + else + time deblob -e 'test*' -e '*/test*' -d "${WORKDIR}" + fi fi .Ed .Sh HISTORY