Skip to content

Commit

Permalink
make install script safer
Browse files Browse the repository at this point in the history
  • Loading branch information
jthistle committed Mar 20, 2021
1 parent 78c1bbc commit 3c3f407
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion linux/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
14 changes: 13 additions & 1 deletion linux/plugins/install.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 3c3f407

Please sign in to comment.