From 7821c02171d77229797e3a57edd0502e942373cc Mon Sep 17 00:00:00 2001 From: Kacper Sagalara Date: Fri, 19 Jun 2026 19:08:11 +0200 Subject: Add missing files. --- scripts/bloatware/main.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/bloatware/main.sh (limited to 'scripts/bloatware/main.sh') 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 " + 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 -- cgit v1.2.3