Delete duplicate target from controllers Makefile, caused by an incorrect merge
[ltp-debian.git] / tools / make-file.sh
blob1fa5dd98b758c03039ba316289d142c56ffe60cd
1 #!/bin/sh
3 # Copyright (c) International Business Machines Corp., 2001
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13 # the GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this pronram; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # FILE: generate.sh
22 # PURPOSE: Creates dat for use in network file transfer tests.
24 # AUTHOR: Randy Hron (rwhron@earthlink.net)
26 ############################################################################
28 file=$1
29 size=$2
31 if [ -z "$1" ] || [ -z "$2" ] ; then
32 echo "Usage: make-file.sh <file> <size in bytes>"
33 exit 1
36 if [ -e $file ] ; then
37 exit 0
40 if ! perl -e "print 'A' x $size" > $file 2> /dev/null ; then
41 if ! awk 'BEGIN { cnt='$size'; while (cnt--) printf "A" }' > $file 2> /dev/null ; then
42 ( while ((size--)) ; do echo -n A ; done ) > $file
46 chmod 666 $file