Skip to content

Commit

Permalink
feat: install mise on ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
pragmaticivan committed Sep 25, 2024
1 parent 6446781 commit aa774fe
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
5 changes: 5 additions & 0 deletions home/.chezmoiscripts/ubuntu/run_once_02-install-mise.sh.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ if eq .chezmoi.os "linux" -}}
{{ if eq .chezmoi.osRelease.idLike "debian" -}}
{{ include "../install/ubuntu/common/mise.sh" }}
{{ end -}}
{{ end -}}
29 changes: 29 additions & 0 deletions install/ubuntu/common/mise.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

set -Eeuo pipefail

if [ "${DOTFILES_DEBUG:-}" ]; then
set -x
fi

function install_mise() {
apt update -y && apt install -y gpg sudo wget curl
sudo install -dm 755 /etc/apt/keyrings
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
# TODO: support multi-arch
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
sudo apt update
sudo apt install -y mise
}

function uninstall_mise() {
sudo apt remove -y mise
}

function main() {
install_mise
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
main
fi

0 comments on commit aa774fe

Please sign in to comment.