Skip to content

Commit 1583ec9

Browse files
committed
adds function to interactive install/update ghostty on ubuntu
1 parent 4f96924 commit 1583ec9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tools/utils.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,18 @@ function to_clipboard {
1212
cat
1313
fi
1414
}
15+
16+
function install_or_update_ghostty {
17+
# see https://github.com/mkasberg/ghostty-ubuntu
18+
19+
source /etc/os-release
20+
local ARCH=$(dpkg --print-architecture)
21+
local GHOSTTY_DEB_URL=$(
22+
curl -s https://api.github.com/repos/mkasberg/ghostty-ubuntu/releases/latest | \
23+
grep -oP "https://github.com/mkasberg/ghostty-ubuntu/releases/download/[^\s/]+/ghostty_[^\s/_]+_${ARCH}_${VERSION_ID}.deb"
24+
)
25+
local GHOSTTY_DEB_FILE=$(basename "$GHOSTTY_DEB_URL")
26+
curl -LO "$GHOSTTY_DEB_URL"
27+
sudo dpkg -i "$GHOSTTY_DEB_FILE"
28+
rm -v "$GHOSTTY_DEB_FILE"
29+
}

0 commit comments

Comments
 (0)