view scripts/genconfig.sh @ 305:b094b81830b0

A pathological case of huffman coding that uses 8 bits to code each of 256 symbols could cause an unsigned char limit[8] to wrap back to 0, setting limit to -1 and making the decompressor exit with a data error.
author Rob Landley <rob@landley.net>
date Sat, 28 Jun 2008 01:07:34 -0500
parents 4f1ca01db000
children 8b0487639db9
line wrap: on
line source

#!/bin/bash

# This has to be a separate file from scripts/make.sh so it can be called
# before menuconfig.  (It's called again from scripts/make.sh just to be sure.)

mkdir -p generated

function genconfig()
{
  for i in $(echo toys/*.c | sort)
  do
    # Grab the config block for Config.in
    echo "# $i"
    sed -n '/^\*\//q;/^config [A-Z]/,$p' $i || exit 1
    echo
  done
}

genconfig > generated/Config.in