diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b94fcb1401..45c4c1d52e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-03-04 Simon Marchi + + * features/feature_to_c.sh: Print the help when passing no + argument. + 2016-03-02 Bernhard Heckel * MAINTAINERS (Write After Approval): Add Bernhard Heckel. diff --git a/gdb/features/feature_to_c.sh b/gdb/features/feature_to_c.sh index 901eb0dce5..439611a552 100755 --- a/gdb/features/feature_to_c.sh +++ b/gdb/features/feature_to_c.sh @@ -19,14 +19,14 @@ # 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 +if test -z "$1" || test -z "$2"; then echo "Usage: $0 OUTPUTFILE INPUTFILE..." exit 1 fi +output=$1 +shift + if test -e "$output"; then echo "Output file \"$output\" already exists; refusing to overwrite." exit 1