Skip to content

Commit 3885344

Browse files
committed
🗄 [chore] Move mise package
1 parent 45a9c65 commit 3885344

6 files changed

Lines changed: 29 additions & 0 deletions

File tree

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ cli-network: $(OS)-cli-network
1212
dropbox: $(OS)-dropbox
1313
git: $(OS)-git
1414
micro: $(OS)-micro
15+
mise: $(OS)-mise
1516
nano: $(OS)-nano
1617
stow: $(OS)-stow
1718
zsh: $(OS)-zsh

makefiles/macos.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ macos-git: macos-brew
105105
macos-micro: macos-brew macos-stow
106106
run "pkg/micro/macos-micro.sh"
107107

108+
macos-mise: macos-brew
109+
run "pkg/mise/mise.sh"
110+
108111
macos-nano: ;
109112

110113
macos-shellcheck: macos-brew macos-stow

makefiles/ubuntu.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ ubuntu-git:
4141
ubuntu-micro: ubuntu-stow
4242
run "pkg/micro/debian-micro.sh"
4343

44+
ubuntu-mise:
45+
run "pkg/mise/mise.sh"
46+
4447
ubuntu-nano:
4548
sudo apt-get update
4649
sudo apt-get install -y nano

pkg/mise/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# `mise`
2+
3+
- Install `mise` CLI
4+
- Symlink `mise`'s only config: `~/.config/mise/config.toml`
5+
6+
Caveats: For now, `mise` is only available in Zsh, and the CLI is installed when `zsh` package is installed.
File renamed without changes.

pkg/mise/mise.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
# Load .zshenv to get XDG_CONFIG_HOME
5+
set +u
6+
# shellcheck source=pkg/zsh/.zshenv
7+
source 'pkg/zsh/.zshenv'
8+
set -u
9+
10+
MISE_DIR="${XDG_CONFIG_HOME}/mise"
11+
CONFIG_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/config.toml"
12+
trap 'unset MISE_DIR CONFIG_PATH' EXIT
13+
14+
# Install dotfiles
15+
mkdir -p "${MISE_DIR}"
16+
ln -sf "${CONFIG_PATH}" "${MISE_DIR}"

0 commit comments

Comments
 (0)