bootstrap: Add argument passing to dotlink

Dotlink now takes arbitrary arguments which it all simply passes through
to dotter underneath.
Also made the directory changing a little more flexible.
This commit is contained in:
Marty Oehme 2025-02-07 16:48:33 +01:00 committed by Marty Oehme
parent 0942a9bc9f
commit caae3513a9

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
# relink all stowed files from anywhere
# grepping is to remove meaningless stderr lines until this bug is fixed:
# https://github.com/aspiers/stow/issues/65
@ -10,6 +10,8 @@
# to customize this to your own needs, change the `push folder` to the
# location of your dotfiles (stow) repository
alias dotlink="pushd ~/.dotfiles;\
dotter deploy;\
popd"
dotlink() {
cd ~/.dotfiles || return
dotter "${@:-deploy}"
cd "$OLDPWD" || return
}