forked from TonyWildish/HEPiX-IPv6-testbed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.sh
More file actions
executable file
·41 lines (34 loc) · 1.07 KB
/
env.sh
File metadata and controls
executable file
·41 lines (34 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
export TESTBED_ROOT=`pwd`
if [ ! -d $TESTBED_ROOT/EBI ] && [ ! -d $TESTBED_ROOT/HEPiX ]; then
echo "Looks like you're not in the root directory of the git repository...?"
exit 0
fi
[ -d data ] || mkdir data
if [ ! -f data/file-100.dat ] || [ ! -f data/file-1000.dat ]; then
echo " "
echo "Your 'data' directory is missing some big files in for testing. I'll make"
echo "them now, please be patient for a few seconds"
# a 1 MB seed file
if [ ! -f data/file-1.dat ]; then
dd if=/dev/urandom of=data/file-1.dat bs=1024 count=1024 >/dev/null 2>&1
fi
# a 100 MB file...
if [ ! -f data/file-100.dat ]; then
for i in 9 8 7 6 5 4 3 2 1 0; do
for j in 9 8 7 6 5 4 3 2 1 0; do
printf " $i$j \r"
cat data/file-1.dat >> data/file-100.dat
done
done
fi
# a 1 GB file
if [ ! -f data/file-1000.dat ]; then
for i in 9 8 7 6 5 4 3 2 1 0; do
printf " $i \r"
cat data/file-100.dat >> data/file-1000.dat
done
fi
echo " "
fi
export PERL5LIB=${PERL5LIB}:$TESTBED_ROOT/perl_lib
export PATH=${PATH}:$TESTBED_ROOT/bin