From 6ffb765c8c31ec4d6ead77de5cfb3ab8f88cf130 Mon Sep 17 00:00:00 2001 From: osm0sis Date: Fri, 20 Jan 2023 12:37:19 -0400 Subject: [PATCH] AK3: correct cmdline to remove any type of leading whitespace --- 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 d57e93a..263758d 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=20230110 +# AK_BASE_VERSION=20230120 diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index 4aa06cb..43d173e 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;^ ;;' -e 's; *; ;g' -e 's;[ \t]*$;;' $cmdfile; + sed -i -e 's;^[ \t]*;;' -e 's; *; ;g' -e 's;[ \t]*$;;' $cmdfile; else match=$(grep -o "$1.*$" $cmdfile | cut -d\ -f1); - sed -i -e "s;${match};${2};" -e 's;^ ;;' -e 's; *; ;g' -e 's;[ \t]*$;;' $cmdfile; + sed -i -e "s;${match};${2};" -e 's;^[ \t]*;;' -e 's; *; ;g' -e 's;[ \t]*$;;' $cmdfile; fi; if [ -f "$home/cmdtmp" ]; then sed -i "s|^cmdline=.*|cmdline=$(cat $cmdfile)|" $split_img/header;