-
Notifications
You must be signed in to change notification settings - Fork 0
/
execute-lib.sh
45 lines (40 loc) · 766 Bytes
/
execute-lib.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
TERMFS=8
launch_xterm () {
local __pid_var=$2
echo "Launching: $1"
uxterm -fs ${TERMFS} -geometry 80x24+$3+$4 -e "$1" &
#uxterm -hold -fs ${TERMFS} -e "$1" &
eval $__pid_var="$!"
sleep 0.2
}
check_processes () {
#echo "check processes: $@"
local __counter=$1
local __tmp=0
shift
while test $# -gt 0; do
kill -0 $1 2> /dev/null
__tmp=`expr ${__tmp} + $?`
#echo " pid: $1 count: $__tmp"
shift
done
eval $__counter="$__tmp"
}
stop_processes () {
while test $# -gt 0; do
kill -9 $1 2> /dev/null
shift
done
}
make_empire () {
make -C empire-client
if test $? -ne 0; then
echo "error while compiling empire-client"
exit 1
fi
make -C empire-server
if test $? -ne 0; then
echo "error while compiling empire-server"
exit 1
fi
}