LarpixClient/assets/install.sh
olcxja 24541f7b41
Some checks failed
Android Build / publish (push) Failing after 10s
Linux Build / publish (push) Failing after 6m10s
fix linux install script not applying icon shortcut
2026-11-10 08:56:12 +01:00

43 lines
No EOL
1,023 B
Bash
Executable file

#!/usr/bin/env bash
set -e
echo "WARNING: Make sure you don't run this script in a folder that contains anything more than Miarven"
echo "otherwise it may result in data loss"
read -r -p "Press Enter to continue (or Ctrl+C, to cancel)..."
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BIN_DIR="$HOME/.local/bin/olcxja.miarven"
APP_DIR="$HOME/.local/share/applications"
ICON_DIR="$HOME/.local/share/icons"
echo "1. Copying files..."
mkdir -p "$BIN_DIR"
mkdir -p "$APP_DIR"
cp -r "$SCRIPT_DIR/"* "$BIN_DIR/"
echo "2. Creating shortcut..."
mv "$BIN_DIR/olcxja.miarven.desktop" "$APP_DIR/olcxja.miarven.desktop"
mv "$BIN_DIR/icon.png" "$ICON_DIR/olcxja.miarven.png"
echo "3. Adding executable permissions..."
chmod +x "$APP_DIR/olcxja.miarven.desktop"
chmod +x "$BIN_DIR/miarven"
echo "4. Cleaning installation..."
rm -f "$BIN_DIR/olcxja.miarven.desktop"
rm -f "$BIN_DIR/install.sh"
echo "5. Installation completed. Cleaning up and launching..."
rm -rf "$SCRIPT_DIR"/*
"$BIN_DIR/miarven" &
exit 0