-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
22 lines (18 loc) · 724 Bytes
/
justfile
File metadata and controls
22 lines (18 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
home := home_directory()
zshrc_exists := path_exists(home / '.zshrc')
bashrc_exists := path_exists(home / '.bashrc')
# List available recipes
default:
@just --list
# Link dotfiles
init:
stow . --no-folding --target={{home}}
{{ if zshrc_exists == "false" { "ln -s " + home + "/.config/zsh/.zshrc " + home + "/.zshrc" } else { "" } }}
{{ if bashrc_exists == "false" { "ln -s " + home + "/.config/bash/.bashrc " + home + "/.bashrc" } else { "" } }}
# Clean dotfiles
clean:
stow -D . --no-folding --target={{home}}
{{ if zshrc_exists == "true" { "rm " + home + "/.zshrc" } else { "" } }}
{{ if bashrc_exists == "true" { "rm " + home + "/.bashrc" } else { "" } }}
# Relink dotfiles
restow: clean init