[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) --------
|
||||
EMACS_PKG="emacs"
|
||||
|
||||
# Required by you:
|
||||
CORE_CLI=(fzf direnv stow pass just)
|
||||
|
||||
# Plus from your history / common tooling:
|
||||
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)
|
||||
|
||||
DESKTOP_LINUX=(kitty alacritty dino syncthing)
|
||||
@ -207,6 +209,7 @@ MAC_BREW_PKGS=(
|
||||
postgresql
|
||||
syncthing
|
||||
pinentry-mac
|
||||
emacs
|
||||
)
|
||||
|
||||
MAC_CASKS=(
|
||||
@ -215,6 +218,7 @@ MAC_CASKS=(
|
||||
slack
|
||||
google-chrome
|
||||
chromium
|
||||
emacs-app
|
||||
)
|
||||
|
||||
# FreeBSD name mapping (best-effort)
|
||||
@ -227,7 +231,7 @@ MAC_CASKS=(
|
||||
# - direnv exists.
|
||||
FREEBSD_CORE=(fzf direnv stow just password-store)
|
||||
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_SECURITY=(gnupg pinentry) # helpful for pass
|
||||
FREEBSD_MISC=(postgresql16-client syncthing)
|
||||
@ -346,22 +350,28 @@ EOF
|
||||
|
||||
log "Done."
|
||||
|
||||
# -------- Doom Emacs --------
|
||||
DOOM_DIR="${DOOM_DIR:-$HOME/.emacs.d}"
|
||||
if [[ -d "$DOOM_DIR/.git" ]]; then
|
||||
log "Doom Emacs already present at $DOOM_DIR (updating)..."
|
||||
git -C "$DOOM_DIR" pull --rebase || true
|
||||
elif [[ -e "$DOOM_DIR" ]]; then
|
||||
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."
|
||||
# -------- Doom Emacs (requires emacs binary) --------
|
||||
if ! have emacs; 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
|
||||
log "Cloning Doom Emacs to $DOOM_DIR..."
|
||||
git clone --depth=1 https://github.com/doomemacs/doomemacs "$DOOM_DIR"
|
||||
fi
|
||||
DOOM_DIR="${DOOM_DIR:-$HOME/.emacs.d}"
|
||||
if [[ -d "$DOOM_DIR/.git" ]]; then
|
||||
log "Doom Emacs already present at $DOOM_DIR (updating)..."
|
||||
git -C "$DOOM_DIR" pull --rebase || true
|
||||
elif [[ -e "$DOOM_DIR" ]]; then
|
||||
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."
|
||||
else
|
||||
log "Cloning Doom Emacs to $DOOM_DIR..."
|
||||
git clone --depth=1 https://github.com/doomemacs/doomemacs "$DOOM_DIR"
|
||||
fi
|
||||
|
||||
if [[ -d "$DOOM_DIR" ]]; then
|
||||
log "Installing Doom Emacs..."
|
||||
"$DOOM_DIR/bin/doom" install
|
||||
if [[ -d "$DOOM_DIR" ]]; then
|
||||
log "Installing Doom Emacs..."
|
||||
"$DOOM_DIR/bin/doom" install
|
||||
fi
|
||||
fi
|
||||
|
||||
# -------- asdf plugins --------
|
||||
|
||||
Reference in New Issue
Block a user