mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Linux: Added install scripts for bash and nushell
Added two scripts to help users install ghostty before it's available from a user's preferred package manager.
This commit is contained in:
26
install_linux.nu
Executable file
26
install_linux.nu
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
# Check if running as root
|
||||
if ((id -u | into int) != 0) {
|
||||
echo "Please run as root (sudo)"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Build and install (errors will automatically cause exit in nu)
|
||||
zig build -Doptimize=ReleaseFast --prefix /usr install
|
||||
|
||||
# Create desktop entry
|
||||
$"[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=ghostty
|
||||
Comment=Ghostty is a terminal emulator that differentiates itself by being fast, feature-rich, and native.
|
||||
Exec=/usr/bin/ghostty
|
||||
Categories=Development;
|
||||
Terminal=false" | save --force /usr/share/applications/ghostty.desktop
|
||||
|
||||
# Set proper permissions
|
||||
chmod 644 /usr/share/applications/ghostty.desktop
|
||||
|
||||
# Update desktop database
|
||||
update-desktop-database /usr/share/applications
|
31
install_linux.sh
Executable file
31
install_linux.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Exit on any error
|
||||
set -e
|
||||
|
||||
# Check if running as root
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run as root (sudo)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Build and install
|
||||
zig build -Doptimize=ReleaseFast --prefix /usr install
|
||||
|
||||
# Create desktop entry
|
||||
cat > /usr/share/applications/ghostty.desktop << 'EOL'
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=ghostty
|
||||
Comment=Ghostty is a terminal emulator that differentiates itself by being fast, feature-rich, and native.
|
||||
Exec=/usr/bin/ghostty
|
||||
Categories=Development;
|
||||
Terminal=false
|
||||
EOL
|
||||
|
||||
# Set perms
|
||||
chmod 644 /usr/share/applications/ghostty.desktop
|
||||
|
||||
# Update desktop database
|
||||
update-desktop-database /usr/share/applications
|
Reference in New Issue
Block a user