-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.sh
executable file
·51 lines (39 loc) · 913 Bytes
/
config.sh
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
42
43
44
45
46
47
48
49
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
remote="$1"
laten="$2"
bd="$3"
remote2="$4"
laten2="$5"
bd2="$6"
#sh server.sh $remote $laten $bd $remote2 $laten2 $bd2
url_tra="$7"
url_split="$8"
cd /Users/zzy/Documents/eclipse/WPT/bin
java -cp .:/Users/zzy/Downloads/selenium-server-standalone-2.44.0.jar wpt/WebPageTest $url_tra $url_split
har_dir=/Users/zzy/Documents/eclipse/WPT/bin/har/
num=0
for file_a in ${har_dir}/*; do
temp_file=`basename $file_a`
echo $temp_file
if [ $num -eq 0 ]; then
f1=$temp_file
fi
if [ $num -eq 1 ]; then
f2=$temp_file
fi
num=$[$num+1]
done
echo f1:${f1}
echo f2:${f2}
cd $har_dir
#f1="$9"
#f2="${10}"
out="${9}" #"${11}"
sh ${DIR}/auto_har.sh ${har_dir}${f1} ${har_dir}${f2} $out
sleep 3s
cd $har_dir
for file_a in ${har_dir}/*; do
temp_file=`basename $file_a`
mv ${temp_file} ../${temp_file}
done