3
3
set -eu
4
4
5
5
SCRIPT=$( readlink -f " $0 " )
6
- SCRIPTPATH=$( dirname $SCRIPT )
6
+ SCRIPTPATH=$( dirname " $SCRIPT " )
7
7
8
8
# Patreon release contains bundled sewer, use it here
9
9
PATH=$SCRIPTPATH /bin:$PATH
@@ -13,52 +13,37 @@ echo "Consider supporting developer on patreon: https://patreon.com/0lach"
13
13
sleep 3
14
14
15
15
STEAMVR=" ${STEAMVR:- $HOME / .local/ share/ Steam/ steamapps/ common/ SteamVR} "
16
- if ! test -d $STEAMVR ; then
16
+ if ! test -d " $STEAMVR " ; then
17
17
echo " SteamVR not found at $STEAMVR (Set \$ STEAMVR manually?)"
18
18
exit 1
19
19
fi
20
20
echo " SteamVR at $STEAMVR "
21
21
22
22
LIGHTHOUSE_DRIVER=$STEAMVR /drivers/lighthouse/bin/linux64
23
23
24
- if ! test -f $LIGHTHOUSE_DRIVER /driver_lighthouse.so; then
24
+ if ! test -f " $LIGHTHOUSE_DRIVER /driver_lighthouse.so" ; then
25
25
echo " Lighthouse driver not found, broken installation?"
26
26
exit 1
27
27
fi
28
28
29
- if ! test -f $LIGHTHOUSE_DRIVER /driver_lighthouse_real.so; then
29
+ if ! test -f " $LIGHTHOUSE_DRIVER /driver_lighthouse_real.so" ; then
30
30
echo " = Moving original driver"
31
- cp $LIGHTHOUSE_DRIVER /driver_lighthouse.so $LIGHTHOUSE_DRIVER /driver_lighthouse_real.so
32
- elif ! grep -s " https://patreon.com/0lach" $LIGHTHOUSE_DRIVER /driver_lighthouse.so; then
31
+ cp " $LIGHTHOUSE_DRIVER /driver_lighthouse.so" " $LIGHTHOUSE_DRIVER /driver_lighthouse_real.so"
32
+ elif ! grep -s " https://patreon.com/0lach" " $LIGHTHOUSE_DRIVER /driver_lighthouse.so" ; then
33
33
echo " Found both original driver, and old original driver, seems like SteamVR was updated"
34
34
echo " = Moving updated original driver"
35
- cp $LIGHTHOUSE_DRIVER /driver_lighthouse.so $LIGHTHOUSE_DRIVER /driver_lighthouse_real.so
35
+ cp " $LIGHTHOUSE_DRIVER /driver_lighthouse.so" " $LIGHTHOUSE_DRIVER /driver_lighthouse_real.so"
36
36
else
37
37
echo " = Proxy driver is already installed, updating"
38
38
fi
39
39
40
40
echo " = Patching real driver"
41
- sewer -v --backup $LIGHTHOUSE_DRIVER /driver_lighthouse_real.so.bak $LIGHTHOUSE_DRIVER /driver_lighthouse_real.so patch-file --partial $SCRIPTPATH /driver_lighthouse_real.sew || true
41
+ sewer -v --backup " $LIGHTHOUSE_DRIVER /driver_lighthouse_real.so.bak" " $LIGHTHOUSE_DRIVER /driver_lighthouse_real.so" patch-file --partial " $SCRIPTPATH /driver_lighthouse_real.sew" || true
42
42
43
43
echo " = Overriding current driver"
44
- rsync -a $SCRIPTPATH /driver_lighthouse.so $LIGHTHOUSE_DRIVER /driver_lighthouse.so
44
+ rsync -a " $SCRIPTPATH /driver_lighthouse.so" " $LIGHTHOUSE_DRIVER /driver_lighthouse.so"
45
45
46
46
echo " = Updating proxy server"
47
- rsync -ar $SCRIPTPATH /lens-server/ $LIGHTHOUSE_DRIVER /lens-server
48
-
49
- echo " = Testing proxy server"
50
- LENS_SERVER=$LIGHTHOUSE_DRIVER /lens-server/lens-server.exe
51
- WINE=" ${WINE:- wine} "
52
- if test $( $WINE $LENS_SERVER check > /dev/null 2> /dev/null || echo $? ) -eq 42; then
53
- echo " Wine found at $WINE "
54
- # Success
55
- elif test $( wine64 $LENS_SERVER check > /dev/null 2> /dev/null || echo $? ) -eq 42; then
56
- echo " Wine found at wine64"
57
- # Success
58
- else
59
- echo " Failed to start lens server, check that you can start it yourself using $WINE $LENS_SERVER "
60
- echo " If you have wine installed at custom path, you can set \$ WINE variable, but make sure Steam can see it"
61
- exit 1
62
- fi
47
+ rsync -ar " $SCRIPTPATH /lens-server/" " $LIGHTHOUSE_DRIVER /lens-server"
63
48
64
49
echo " Installation finished, try to start SteamVR"
0 commit comments