Merge "switch drools pdp image to new one"
[integration.git] / test / mocks / datafilecollector-testharness / simulator-group / setup-ftp-files-for-image.sh
1 #!/bin/bash
2
3 # Script to create files for the FTP server to return upon request.
4 # The file names matches the files names in the events polled from the MR simulator.
5 # Intended for execution in the running ftp containers in the ftp-root dir.
6
7 echo "Running ftp file creations"
8
9 NUM=200 #Default number of files 
10
11 if [ $# -eq 1 ]; then 
12     NUM=$1
13 fi
14
15 truncate -s 1MB 1MB.tar.gz
16 truncate -s 5MB 5MB.tar.gz
17 truncate -s 50MB 50MB.tar.gz
18
19
20 i=0
21 while [ $i -lt $NUM ]; do  #Problem with for loop and var substituion in curly bracket....so used good old style loop
22    ln -s 1MB.tar.gz 1MB_$i.tar.gz
23    ln -s 5MB.tar.gz 5MB_$i.tar.gz
24    let i=i+1
25 done
26
27
28 ln -s 50MB.tar.gz 50MB_0.tar.gz   #Large file, only for single file test