#!/usr/bin/env bash # ---------------------------------------------------------------------- # INITIALIZE the HAMACS SYSTEM # ---------------------------------------------------------------------- # shellcheck disable=SC2164 HAMACS_DIR=$(cd "$(dirname "$0")"; pwd) HAMACS_DEST=$HOME/.emacs.d cd "$HAMACS_DIR" mkdir -p "$HAMACS_DEST" for LINK in snippets templates elisp do echo "Symlinking $HAMACS_DEST/$LINK to $HAMACS_DIR/$LINK ..." rm -rf "${HAMACS_DEST:-~}/$LINK" ln -s "$HAMACS_DIR/$LINK" "$HAMACS_DEST" done echo Download the public keys: gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40 cat > "$HAMACS_DEST/early-init.el" <> "$HAMACS_DEST/early-init.el" done cat >> "$HAMACS_DEST/early-init.el" < "$HAMACS_DEST/init.el" <