AK3: correct cmdline to remove any type of leading whitespace

This commit is contained in:
osm0sis committed 2023-01-20 12:37:19 -04:00
1 parent 8077d11135
commit 6ffb765c8c
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -3,4 +3,4 @@
# Dummy file; update-binary is a shell script (DO NOT CHANGE)
#
#
# AK_BASE_VERSION=20230110
# AK_BASE_VERSION=20230120
+2 -2
View File
@@ -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;