diff --git a/linux/plugins/README.md b/linux/plugins/README.md index 540f9c6b3..a80a1ae0c 100644 --- a/linux/plugins/README.md +++ b/linux/plugins/README.md @@ -24,4 +24,4 @@ python3 main.py This will by default run at `localhost:3141`, but feel free to change the port by adding the `--port` flag. -Then just visit `localhost:3141` (or your specified) port to view the web interface! +Then just visit `localhost:3141` (or your specified port) to view the web interface! diff --git a/linux/plugins/install.sh b/linux/plugins/install.sh index eadbe64da..4730a8c28 100755 --- a/linux/plugins/install.sh +++ b/linux/plugins/install.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash cp read_util "../server" -cp ets2-telemetry-lin.so "$HOME/.local/share/Steam/steamapps/common/Euro Truck Simulator 2/bin/linux_x64/plugins" + +if [ ! -d "$HOME/.local/share/Steam/steamapps/common/Euro Truck Simulator 2/bin/linux_x64/" ]; then + echo "WARN: Could not find ETS2 installation! Please manually move ets2-telemetry-lin.so to your plugins directory." + echo "Installed with partial success" + exit 1 +else + mkdir -p "$HOME/.local/share/Steam/steamapps/common/Euro Truck Simulator 2/bin/linux_x64/plugins" + mkdir -p "$HOME/.local/share/Steam/steamapps/common/Euro Truck Simulator 2/bin/linux_x86/plugins" + cp ets2-telemetry-lin.so "$HOME/.local/share/Steam/steamapps/common/Euro Truck Simulator 2/bin/linux_x64/plugins" + cp ets2-telemetry-lin.so "$HOME/.local/share/Steam/steamapps/common/Euro Truck Simulator 2/bin/linux_x86/plugins" +fi + +echo "Installed successfully"