diff options
| author | Kacper Sagalara <mail@kasesag.me> | 2026-06-19 19:08:11 +0200 |
|---|---|---|
| committer | Kacper Sagalara <mail@kasesag.me> | 2026-06-19 19:08:11 +0200 |
| commit | 7821c02171d77229797e3a57edd0502e942373cc (patch) | |
| tree | 2856fdb7f36144c6e539cfedacd475bf10458ce1 /scripts/bloatware/main.sh | |
| parent | 0339c6b9e1cafffc2e37c47df4277157fc678041 (diff) | |
Diffstat (limited to 'scripts/bloatware/main.sh')
| -rwxr-xr-x | scripts/bloatware/main.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/bloatware/main.sh b/scripts/bloatware/main.sh new file mode 100755 index 0000000..2a76137 --- /dev/null +++ b/scripts/bloatware/main.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +if [ "$#" -ne 1 ]; then + echo "[x] Incorrect arguments!" + echo " Using: $0 <BASE_DIR>" + exit 1 +fi + +BASE_DIR=$1 +SCRIPT_DIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")") +CONFIG="${SCRIPT_DIR}/bloatware.json" +BLOATWARE=() + +BLOATWARE+=($(jq -r '.product_a[] | select(.remove == true) | "product_a/\(.path)"' "$CONFIG")) +BLOATWARE+=($(jq -r '.system_a[] | select(.remove == true) | "system_a/\(.path)"' "$CONFIG")) +BLOATWARE+=($(jq -r '.system_ext_a[] | select(.remove == true) | "system_ext_a/\(.path)"' "$CONFIG")) + +for package in "${BLOATWARE[@]}"; do + echo "[-] ${BASE_DIR}/${package}" + rm -rf "${BASE_DIR}/${package}" +done |
