aboutsummaryrefslogtreecommitdiff
path: root/scripts/genconfig.sh
blob: 59c63c5b89eb08190586026780ed61b0935c0819 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

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