From 1073d0a3e41799a92c32a7639d27d6b313a4e39f Mon Sep 17 00:00:00 2001 From: Botspot <54716352+Botspot@users.noreply.github.com> Date: Sat, 17 Feb 2024 17:05:11 -0600 Subject: [PATCH] zzzz_combine_values: intercept command line arguments --- apps/Better Chromium/install | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/Better Chromium/install b/apps/Better Chromium/install index ecafeb621f..308f5050d4 100755 --- a/apps/Better Chromium/install +++ b/apps/Better Chromium/install @@ -300,6 +300,18 @@ cat << "EOF" | sudo tee "${folder}/zzzz_combine_values" >/dev/null #This script combines multiple invocations of --enable-features and --disable-features into one argument so that Chromium does not ignore any. #Written by Botspot for the Pi-Apps Better Chromium script. +#Intercept chromium args and move them to CHROMIUM_FLAGS +while [ $# -gt 0 ]; do + case "$1" in + #Avoid passing chromium-browser script args to chromium-browser binary + -h | --help | -help | --verbose | -g | --debug | --no-touch-pinch | --temp-profile | -- ) # Stop option prcessing + break ;; + * ) + CHROMIUM_FLAGS="$CHROMIUM_FLAGS $1" + shift ;; + esac +done + IFS=' ' enable='' disable=''