Hello!
I am hooking GRUB bootloader's built-in commands. When I use GRUB's "./configure" to rebuild GRUB, I need to specify a lot of options in the command line. This is very inconvenient. Is there any way to type those options in some text file and then use it together with ./configure?
Some examples.
Lets "options.txt" be the file with the command line options that I need to specify. For example, it will contain the following text:
--enable-protector-mode \
--enable-example-kernel \
--disable-reiserfs \
--disable-iso9660 \
--disable-ffs \
"CFLAGS=-g -fno-stack-protector"
I tried the following variants but without success:
1) $ ./configure 'cat options.txt'
2) $ ./configute $(cat options.txt)
3) cat options.txt | ./configure
configure either doesn't understand the backlash ('\') from 'options.txt' or doesn't like CFLAGS. If I copy the text from "options.txt" and then manually insert it immediately after "$ ./configure ", then everything works fine. For example, why doesn't variant number 3) work?
Can anyone help me?
Thanks.
Best regards,
Xela
How to conveniently specify a long line of command options?
Re: How to conveniently specify a long line of command optio
you need to space seperate them not newline, 'cat' does not understand \ to mean continue on the lineVonigol wrote: --enable-protector-mode \
--enable-example-kernel \
--disable-reiserfs \
--disable-iso9660 \
--disable-ffs \
"CFLAGS=-g -fno-stack-protector"
this puts the options on stdin of configure, not the command lineVonigol wrote: 3) cat options.txt | ./configure
what you should do is space seperate the options ( put them on the same line ) then do
Code: Select all
./configure `cat options.txt`