aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall.sh22
1 files changed, 13 insertions, 9 deletions
diff --git a/install.sh b/install.sh
index c887a45..8476371 100755
--- a/install.sh
+++ b/install.sh
@@ -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