#!/bin/sh # Install AnyBot from this package for the current user (no root needed). # ./install.sh the app (menu entry and icon too when this computer has a desktop) # Then: open AnyBot from the menu, or on a computer without a screen: anybot setup set -e cd "$(dirname "$0")" BIN="$HOME/.local/bin" mkdir -p "$BIN" install -m 755 anybot "$BIN/anybot" if [ -f anybot.desktop ]; then APPS="$HOME/.local/share/applications"; ICONS="$HOME/.local/share/icons/hicolor" mkdir -p "$APPS" "$ICONS/scalable/apps" "$ICONS/256x256/apps" install -m 644 anybot.desktop "$APPS/anybot.desktop" install -m 644 anybot.svg "$ICONS/scalable/apps/anybot.svg" "$BIN/anybot" --write-icon "$ICONS/256x256/apps/anybot.png" 256 2>/dev/null || true command -v update-desktop-database >/dev/null && update-desktop-database "$APPS" 2>/dev/null || true fi echo "AnyBot 已安裝在 $BIN/anybot" case ":$PATH:" in *":$BIN:"*) ;; *) echo "(把 $BIN 加到 PATH,才能直接打 anybot)" ;; esac if ! ldconfig -p 2>/dev/null | grep -q libasound.so.2; then echo "還需要 libasound2:sudo apt-get install -y libasound2(或 libasound2t64)" fi echo "接到你的大腦:在手機或電腦的 AnyBot 按「加一台電腦」,把那一行貼到這裡執行。"