Created
August 6, 2025 16:07
-
-
Save BuddhiLW/ca52195a858fd29c379dcb095ebcfd2b to your computer and use it in GitHub Desktop.
Station unifying app install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
APP_NAME="Station" | |
REPO="getstation/desktop-app" | |
APPIMAGE_NAME="station.appimage" | |
APP_DIR="$HOME/.local/bin" | |
DESKTOP_FILE="$HOME/.local/share/applications/station.desktop" | |
ICON_URL="https://avatars.githubusercontent.com/u/27734877?s=200&v=4" | |
ICON_PATH="$HOME/.local/share/icons/hicolor/128x128/apps/station.png" | |
echo "π¦ Creating directories..." | |
mkdir -p "$APP_DIR" | |
mkdir -p "$(dirname "$DESKTOP_FILE")" | |
mkdir -p "$(dirname "$ICON_PATH")" | |
echo "β¬οΈ Downloading latest $APP_NAME release from GitHub..." | |
cd /tmp | |
gh release download --repo "$REPO" --pattern '*.AppImage' --output "$APPIMAGE_NAME" | |
echo "π Moving AppImage to $APP_DIR..." | |
mv "$APPIMAGE_NAME" "$APP_DIR/" | |
chmod +x "$APP_DIR/$APPIMAGE_NAME" | |
echo "πΌοΈ Downloading icon..." | |
wget -q "$ICON_URL" -O "$ICON_PATH" | |
echo "π Creating .desktop entry..." | |
cat > "$DESKTOP_FILE" <<EOF | |
[Desktop Entry] | |
Name=$APP_NAME | |
Comment=Multi-messenger client | |
Exec=$APP_DIR/$APPIMAGE_NAME | |
Icon=station | |
Terminal=false | |
Type=Application | |
Categories=Network;Chat; | |
StartupWMClass=Station | |
EOF | |
echo "π Updating desktop database..." | |
update-desktop-database "$HOME/.local/share/applications" || true | |
echo "β $APP_NAME has been installed and added to your app launcher!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment