diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-08-28 11:56:08 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-08-28 11:56:08 +0200 |
| commit | dedf1c1c1771b2a555448aca6d4796ec06df38d2 (patch) | |
| tree | c63e4c572f3e5c8f7bde9bcaaed18607bcee793a /install.sh | |
| parent | ac867e76793d21e3e4e1d07257a5b93941b53321 (diff) | |
| download | dotfiles-dedf1c1c1771b2a555448aca6d4796ec06df38d2.tar.gz dotfiles-dedf1c1c1771b2a555448aca6d4796ec06df38d2.zip | |
Don't require GNU Emacs to be installed
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -19,7 +19,7 @@ set -e ## # Let's ask for some dependencies and nice-to-have binaries. -binaries=(git curl vim emacs) +binaries=(git curl vim) for bin in "${binaries[@]}"; do if ! [ -x "$(command -v ${bin})" ]; then echo "Error: the binary '${bin}' is not installed." >&2 @@ -70,19 +70,23 @@ done ## # GNU Emacs: just install Doom and take it from there. -rm -rf "${HOME:?}/.config/doom" -ln -s "$(readlink -f .config/doom)" "${HOME:?}/.config/doom" +if [ -x "$(command -v emacs)" ]; then + rm -rf "${HOME:?}/.config/doom" + ln -s "$(readlink -f .config/doom)" "${HOME:?}/.config/doom" -if [ -d "${HOME:?}/.config/emacs" ]; then - if [ -x "$(command -v doom)" ]; then - doom upgrade + if [ -d "${HOME:?}/.config/emacs" ]; then + if [ -x "$(command -v doom)" ]; then + doom upgrade + fi + else + git clone https://github.com/hlissner/doom-emacs "${HOME:?}/.config/emacs" fi + + "${HOME:?}/.config/emacs/bin/doom" install else - git clone https://github.com/hlissner/doom-emacs "${HOME:?}/.config/emacs" + echo "Skipping GNU Emacs setup." fi -"${HOME:?}/.config/emacs/bin/doom" install - ## # Other stuff |
