X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=scripts%2Ffeature_to_c.sh;h=b1169899c19d0a7860e3da995e7f68a7812aac6a;hb=a1d22c668a7662289b42624fe2aa92c9a23df1d2;hp=c8ce9b88f6d910632f8112f49c47324bb7724a21;hpb=6f1d2d1c5ad20d464705b17318cb7ca495f8078a;p=mirror_qemu.git diff --git a/scripts/feature_to_c.sh b/scripts/feature_to_c.sh index c8ce9b88f6..b1169899c1 100644 --- a/scripts/feature_to_c.sh +++ b/scripts/feature_to_c.sh @@ -19,16 +19,8 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see . -output=$1 -shift - -if test -z "$output" || test -z "$1"; then - echo "Usage: $0 OUTPUTFILE INPUTFILE..." - exit 1 -fi - -if test -e "$output"; then - echo "Output file \"$output\" already exists; refusing to overwrite." +if test -z "$1"; then + echo "Usage: $0 INPUTFILE..." exit 1 fi @@ -60,17 +52,17 @@ for input; do printf "'\''\\n'\'', \n" } END { print " 0 };" - }' < $input >> $output + }' < $input done -echo >> $output -echo "const char *const xml_builtin[][2] = {" >> $output +echo +echo "const char *const xml_builtin[][2] = {" for input; do basename=$(echo $input | sed 's,.*/,,') arrayname=xml_feature_$(echo $input | sed 's,.*/,,; s/[-.]/_/g') - echo " { \"$basename\", $arrayname }," >> $output + echo " { \"$basename\", $arrayname }," done -echo " { (char *)0, (char *)0 }" >> $output -echo "};" >> $output +echo " { (char *)0, (char *)0 }" +echo "};"