#!/bin/bash # Lilith AI Desktop Chat - Post-installation script # Called by dpkg after package installation set -e # Install location from electron-builder INSTALL_DIR="/opt/Lilith AI Desktop Chat" CLI_SOURCE="$INSTALL_DIR/resources/chat" CLI_TARGET="/usr/local/bin/chat" # Create symlink for the chat command if [[ -f "$CLI_SOURCE" ]]; then ln -sf "$CLI_SOURCE" "$CLI_TARGET" chmod +x "$CLI_TARGET" echo "Installed 'chat' command to $CLI_TARGET" else echo "Warning: CLI launcher not found at $CLI_SOURCE" >&2 fi # Update desktop database if available if command -v update-desktop-database &> /dev/null; then update-desktop-database /usr/share/applications 2>/dev/null || true fi # Update icon cache if available if command -v gtk-update-icon-cache &> /dev/null; then gtk-update-icon-cache -f -t /usr/share/icons/hicolor 2>/dev/null || true fi exit 0