blob: 14446f67522192ee51e7733906298b8c0116abdc (
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
28
29
30
31
32
33
34
|
#!/bin/bash
path="$(dirname "$0")"
arch="$(uname -m)" # x86_64 or arm64
run_app_normal(){
"$path/UVtools"
}
run_app_dotnet(){
if [ -z "$(command -v dotnet)" ]; then
echo "$(uname) $arch requires dotnet in order to run."
echo 'Please use the auto installer script to install all the dependencies.'
exit -1
fi
if [ -f "$path/UVtools.dll" ]; then
dotnet "$path/UVtools.dll"
else
echo "Error: UVtools.dll not found."
exit -1
fi
}
if [ "${OSTYPE:0:6}" == "darwin" -a "$arch" == "arm64" ]; then
run_app_dotnet
elif [ -f "$path/UVtools" ]; then
run_app_normal
elif [ -f "$path/UVtools.dll" ]; then
run_app_dotnet
else
echo 'Error: Unable to detect UVtools or to run it.'
echo 'Please use the auto installer script to re/install UVtools.'
exit -1
fi
|