summarylogtreecommitdiffstats
path: root/run.sh
blob: 4c008f0bcb6ffc09c81995ae693c969751cd87b6 (plain)
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
#!/bin/bash

if [ $# -eq 0 ]; then

	export CUR_PATH=$(dirname $(readlink -f ${BASH_SOURCE}))
   	# echo 当前运行目录:/opt/cn.i4Tools
	cd /opt/cn.i4Tools
	export LD_LIBRARY_PATH=/opt/cn.i4Tools/lib:$LD_LIBRARY_PATH
	export QT_AUTO_SCREEN_SCALE_FACTOR=0
	export QT_XCB_GL_INTEGRATION=none
   	/opt/cn.i4Tools/i4Tools
   
else
    	export PID_USBMUX=$1
    	export mycommand=$2
   
    	kill -9 $PID_USBMUX
    	shift 1
    	remaining_args=()

	for (( i=2; i<=$#; i++ )); do
    		remaining_args+=("${!i}")
	done

	# echo "Executing command with arguments: $mycommand ${remaining_args[*]}"
	$mycommand "${remaining_args[@]}"	
fi