From 8077d111357a12cc71a8d1ef7972bda68a24d2ea Mon Sep 17 00:00:00 2001 From: osm0sis Date: Mon, 9 Jan 2023 19:19:13 -0400 Subject: [PATCH] AK3: also remove leading spaces from cmdline --- META-INF/com/google/android/updater-script | 2 +- tools/ak3-core.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/META-INF/com/google/android/updater-script b/META-INF/com/google/android/updater-script index 8835923..d57e93a 100644 --- a/META-INF/com/google/android/updater-script +++ b/META-INF/com/google/android/updater-script @@ -3,4 +3,4 @@ # Dummy file; update-binary is a shell script (DO NOT CHANGE) # # -# AK_BASE_VERSION=20230108 +# AK_BASE_VERSION=20230110 diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index d2725a5..4aa06cb 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -686,10 +686,10 @@ patch_cmdline() { if ! grep -q "$1" $cmdfile; then cmdtmp=$(cat $cmdfile); echo "$cmdtmp $2" > $cmdfile; - sed -i -e 's; *; ;g' -e 's;[ \t]*$;;' $cmdfile; + sed -i -e 's;^ ;;' -e 's; *; ;g' -e 's;[ \t]*$;;' $cmdfile; else match=$(grep -o "$1.*$" $cmdfile | cut -d\ -f1); - sed -i -e "s;${match};${2};" -e 's; *; ;g' -e 's;[ \t]*$;;' $cmdfile; + sed -i -e "s;${match};${2};" -e 's;^ ;;' -e 's; *; ;g' -e 's;[ \t]*$;;' $cmdfile; fi; if [ -f "$home/cmdtmp" ]; then sed -i "s|^cmdline=.*|cmdline=$(cat $cmdfile)|" $split_img/header;