printf: fix printf "%u\n" +18446744073709551614
[oweals/busybox.git] / scripts / mkconfigs
index 47ac53330854efa3a32dcd17e20c96f379044277..6a26fe1dd226d010e5d079103c7df1291d32bda9 100755 (executable)
@@ -42,7 +42,7 @@ echo "\
  */
 static const char bbconfig_config[] ALIGN1 ="
 
-grep '^#\? \?CONFIG_' "$config" \
+grep -e '^# CONFIG_' -e '^CONFIG_' "$config" \
 | sed -e 's/\"/\\\"/g' -e 's/^/"/' -e 's/$/\\n"/'
 
 echo ";"
@@ -63,13 +63,13 @@ echo "\
  */
 static const char bbconfig_config_bz2[] ALIGN1 = {"
 
-grep '^#\? \?CONFIG_' "$config" \
+grep -e '^# CONFIG_' -e '^CONFIG_' "$config" \
 | bzip2 -1 | dd bs=2 skip=1 2>/dev/null \
-| od -v -t x1 \
+| od -v -b \
 | sed -e 's/^[^ ]*//' \
         -e 's/ //g' \
         -e '/^$/d' \
-        -e 's/\(..\)/0x\1,/g'
+        -e 's/\(...\)/0\1,/g'
 
 echo "};"
 echo "#endif"