38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Check if binary exists
|
|
if [ ! -f "build/playback" ]; then
|
|
echo "Error: build/playback not found. Run 'make build' first."
|
|
exit 1
|
|
fi
|
|
|
|
# Install binary to /usr/local/bin
|
|
echo "Installing binary to /usr/local/bin/playback..."
|
|
sudo cp build/playback /usr/local/bin/playback
|
|
sudo chmod +x /usr/local/bin/playback
|
|
|
|
# Create desktop entry directory if it doesn't exist
|
|
mkdir -p ~/.local/share/applications
|
|
|
|
# Create desktop entry
|
|
cat > ~/.local/share/applications/playback.desktop << 'EOF'
|
|
[Desktop Entry]
|
|
Name=Playback
|
|
Comment=Audio player with synchronized transcript display
|
|
Exec=/usr/local/bin/playback %f
|
|
Icon=audio-x-generic
|
|
Terminal=true
|
|
Type=Application
|
|
Categories=AudioVideo;Audio;Player;
|
|
MimeType=audio/mpeg;audio/mp3;audio/wav;audio/x-wav;audio/flac;audio/ogg;audio/x-vorbis+ogg;
|
|
EOF
|
|
|
|
# Update desktop database
|
|
update-desktop-database ~/.local/share/applications 2>/dev/null || true
|
|
|
|
echo "Binary installed to /usr/local/bin/playback"
|
|
echo "Desktop entry installed to ~/.local/share/applications/playback.desktop"
|
|
echo "Playback is now available in your application menu and via 'playback' command"
|