[setup] Fix missing emacs install before running doom init
This commit is contained in:
BIN
bin/.local/bin/sess
Executable file
BIN
bin/.local/bin/sess
Executable file
Binary file not shown.
@ -157,13 +157,15 @@ ensure_flathub() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# -------- Package sets (portable intent) --------
|
# -------- Package sets (portable intent) --------
|
||||||
|
EMACS_PKG="emacs"
|
||||||
|
|
||||||
# Required by you:
|
# Required by you:
|
||||||
CORE_CLI=(fzf direnv stow pass just)
|
CORE_CLI=(fzf direnv stow pass just)
|
||||||
|
|
||||||
# Plus from your history / common tooling:
|
# Plus from your history / common tooling:
|
||||||
EXTRA_CLI=(fd git)
|
EXTRA_CLI=(fd git)
|
||||||
|
|
||||||
DEV_TOOLS_LINUX=(cmake libtool make gcc gcc-c++)
|
DEV_TOOLS_LINUX=(cmake libtool make gcc gcc-c++ emacs)
|
||||||
UTILS_LINUX=(gnuplot graphviz shfmt shellcheck pandoc)
|
UTILS_LINUX=(gnuplot graphviz shfmt shellcheck pandoc)
|
||||||
|
|
||||||
DESKTOP_LINUX=(kitty alacritty dino syncthing)
|
DESKTOP_LINUX=(kitty alacritty dino syncthing)
|
||||||
@ -207,6 +209,7 @@ MAC_BREW_PKGS=(
|
|||||||
postgresql
|
postgresql
|
||||||
syncthing
|
syncthing
|
||||||
pinentry-mac
|
pinentry-mac
|
||||||
|
emacs
|
||||||
)
|
)
|
||||||
|
|
||||||
MAC_CASKS=(
|
MAC_CASKS=(
|
||||||
@ -215,6 +218,7 @@ MAC_CASKS=(
|
|||||||
slack
|
slack
|
||||||
google-chrome
|
google-chrome
|
||||||
chromium
|
chromium
|
||||||
|
emacs-app
|
||||||
)
|
)
|
||||||
|
|
||||||
# FreeBSD name mapping (best-effort)
|
# FreeBSD name mapping (best-effort)
|
||||||
@ -227,7 +231,7 @@ MAC_CASKS=(
|
|||||||
# - direnv exists.
|
# - direnv exists.
|
||||||
FREEBSD_CORE=(fzf direnv stow just password-store)
|
FREEBSD_CORE=(fzf direnv stow just password-store)
|
||||||
FREEBSD_EXTRA=(fd-find editorconfig-core-c git)
|
FREEBSD_EXTRA=(fd-find editorconfig-core-c git)
|
||||||
FREEBSD_DEV=(cmake libtool gmake llvm) # gmake instead of make; llvm as a sane default toolchain
|
FREEBSD_DEV=(cmake libtool gmake llvm emacs) # gmake instead of make; llvm as a sane default toolchain
|
||||||
FREEBSD_UTILS=(gnuplot graphviz shfmt shellcheck pandoc)
|
FREEBSD_UTILS=(gnuplot graphviz shfmt shellcheck pandoc)
|
||||||
FREEBSD_SECURITY=(gnupg pinentry) # helpful for pass
|
FREEBSD_SECURITY=(gnupg pinentry) # helpful for pass
|
||||||
FREEBSD_MISC=(postgresql16-client syncthing)
|
FREEBSD_MISC=(postgresql16-client syncthing)
|
||||||
@ -346,22 +350,28 @@ EOF
|
|||||||
|
|
||||||
log "Done."
|
log "Done."
|
||||||
|
|
||||||
# -------- Doom Emacs --------
|
# -------- Doom Emacs (requires emacs binary) --------
|
||||||
DOOM_DIR="${DOOM_DIR:-$HOME/.emacs.d}"
|
if ! have emacs; then
|
||||||
if [[ -d "$DOOM_DIR/.git" ]]; then
|
log "WARNING: emacs binary not found in PATH — skipping Doom Emacs installation."
|
||||||
|
log "Install emacs via your package manager and re-run this script, or run:"
|
||||||
|
log " ~/.emacs.d/bin/doom install"
|
||||||
|
else
|
||||||
|
DOOM_DIR="${DOOM_DIR:-$HOME/.emacs.d}"
|
||||||
|
if [[ -d "$DOOM_DIR/.git" ]]; then
|
||||||
log "Doom Emacs already present at $DOOM_DIR (updating)..."
|
log "Doom Emacs already present at $DOOM_DIR (updating)..."
|
||||||
git -C "$DOOM_DIR" pull --rebase || true
|
git -C "$DOOM_DIR" pull --rebase || true
|
||||||
elif [[ -e "$DOOM_DIR" ]]; then
|
elif [[ -e "$DOOM_DIR" ]]; then
|
||||||
log "Skipping Doom Emacs clone because $DOOM_DIR exists but is not a git repo."
|
log "Skipping Doom Emacs clone because $DOOM_DIR exists but is not a git repo."
|
||||||
log "Move it aside if you want to install Doom there."
|
log "Move it aside if you want to install Doom there."
|
||||||
else
|
else
|
||||||
log "Cloning Doom Emacs to $DOOM_DIR..."
|
log "Cloning Doom Emacs to $DOOM_DIR..."
|
||||||
git clone --depth=1 https://github.com/doomemacs/doomemacs "$DOOM_DIR"
|
git clone --depth=1 https://github.com/doomemacs/doomemacs "$DOOM_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d "$DOOM_DIR" ]]; then
|
if [[ -d "$DOOM_DIR" ]]; then
|
||||||
log "Installing Doom Emacs..."
|
log "Installing Doom Emacs..."
|
||||||
"$DOOM_DIR/bin/doom" install
|
"$DOOM_DIR/bin/doom" install
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -------- asdf plugins --------
|
# -------- asdf plugins --------
|
||||||
|
|||||||
Reference in New Issue
Block a user