feat: added install script

This commit is contained in:
v4n
2025-01-14 16:25:43 +02:00
parent ecd31b6eac
commit 33403a69f1
3 changed files with 31 additions and 3 deletions
Executable
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
set -e
if [ "$(id -u)" -eq 0 ]; then
echo "Run me as normal user, not as root."
exit 1
fi
DESTINATION_PATH="/usr/local/bin"
SCRIPT_NAME="h2mm"
echo "Installing $SCRIPT_NAME..."
sudo curl https://raw.githubusercontent.com/v4n00/h2mm-cli/refs/heads/master/h2mm --output "$DESTINATION_PATH/$SCRIPT_NAME"
sudo chmod +x "$DESTINATION_PATH/$SCRIPT_NAME"
if [[ ! -x "$(command -v $SCRIPT_NAME)" ]]; then
echo "Installation failed."
exit 1
fi
echo "Helldivers 2 Mod Manager CLI installed successfully to $DESTINATION_PATH/$SCRIPT_NAME."