nixos/system/home/scripts/shell/sync-emacs.sh
Evie Litherland-Smith 86938499ad Move Emacs init.el and templates back to own repo, keep packages managed by nix
Restore sync-emacs script but without make step, include cleaning up
old Emacs config
2024-12-19 10:45:12 +00:00

11 lines
394 B
Bash

# Clone ~/.config/emacs/ if it doesn't exist
EMACS_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/emacs"
if [ ! -d "$EMACS_DIR" ]; then
git -C "$EMACS_DIR" pull --ff --ff-only
else
git clone "https://git.xenia.me.uk/pixelifytica/emacs.git" "$EMACS_DIR"
fi
# Cleanup legacy Emacs config file/directory
[ -f "$HOME/.emacs" ] && rm "$HOME/.emacs"
[ -f "$HOME/.emacs.d" ] && rm -r "$HOME/.emacs.d"