bud: add install-doom command

This commit is contained in:
Infinidoge 2021-10-22 12:18:14 -04:00
parent de3ec95272
commit 740f5fbb10
2 changed files with 15 additions and 0 deletions

View file

@ -13,5 +13,12 @@
help = "Shortcut for nixos-rebuild using the current hostname";
script = ./buildthis.bash;
};
install-doom = {
writer = budUtils.writeBashWithPaths [ git coreutils emacs ];
synopsis = "install-doom [ARGS]";
help = "Installs Doom Emacs from https://github.com/hlissner/doom-emacs";
script = ./install-doom.bash;
};
};
}

8
bud/install-doom.bash Normal file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [ -x $XDG_CONFIG_HOME/emacs ]; then
git clone --depth 1 https://github.com/hlissner/doom-emacs $XDG_CONFIG_HOME/emacs
$XDG_CONFIG_HOME/emacs/bin/doom install "$@"
else
echo "fatal: $XDG_CONFIG_HOME/emacs already exists!"
fi