-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.sh
executable file
·44 lines (38 loc) · 1.05 KB
/
index.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
#!/bin/sh
complete -W "appium port device" index.sh
arg1=$1
index=$(seq $#)
for i in $index; do
array+=${@:$(($i + 1))}
break
done
appium() {
sh $(pwd)/script/appium.sh ${array[@]}
}
pool_port() {
sh $(pwd)/script/pool_port.sh ${array[@]}
}
pool_device() {
sh $(pwd)/script/pool_devices.sh ${array[@]}
}
help() {
echo "Usage: $0 [options]"
echo "Options:"
echo " appium, --appium Run appium with specific port"
echo " port, --pool-port Get port of appium on LeapXpert device farm"
echo " device, --pool-device Get device of appium on LeapXpert device farm"
}
while [[ "$#" -gt 0 ]]; do
case $1 in
appium | --appium) appium shift ;;
port | --pool-port) pool_port shift ;;
device | --pool-device) pool_device shift ;;
*) echo "Unknown parameter passed $1" ;;
esac
shift
exit 1
done
# ################################################################################
# # Help #
# ################################################################################
help