make oldconfigで全ての問い合わせ項目にEnterするスクリプト #LinuxLinux kernelのmakeのターゲットでありそうな気もするんですが、見つからなかったので。

$ cat make_oldconfig_auto.sh

#!/usr/bin/env expect

set timeout 10
spawn make oldconfig
while {1} {
        expect {
                "] (NEW)" { send "\n" }
                "# configuration written to .config" {break}
        }
}

interact


見てわかるとおり、expectを使って、”] (NEW)”というのが出てきたら、Enter入力。
“# configuration written to .config”が出てきたらおしまい。

というスクリプトです。


関連記事:

Facebook Comments

 Leave a Reply


上の画像の文字を入力して下さい(入力必須)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt="">