Skip to content

Instantly share code, notes, and snippets.

@farrokhi
Last active May 15, 2023 18:37
Show Gist options
  • Save farrokhi/5147b37a159435423ceada08f27c148d to your computer and use it in GitHub Desktop.
Save farrokhi/5147b37a159435423ceada08f27c148d to your computer and use it in GitHub Desktop.
#!/bin/sh
set -eu
export LISPDIR="${HOME}/.emacs.d/lisp"
export MUCOMMIT="HEAD-"$(git log -n1 --decorate=no --shortstat --abbrev-commit | head -n1 | awk '{print $2}')
if [ `uname -m` = "arm64" ]; then
export HBPREFIX="/opt/homebrew/Cellar"
else
export HBPREFIX="/usr/local"
fi
rm -fr build
meson setup build/ -Dprefix=${HBPREFIX}/mu/${MUCOMMIT} -Ddatadir=${HBPREFIX}/mu/${MUCOMMIT}/share/emacs/site-lisp/mu -Dguile=disabled
ninja -C build/
sudo ninja -C build/ install
ln -vFfs ${HBPREFIX}/mu/${MUCOMMIT}/bin/mu ~/bin/mu
ln -vFfs ${HBPREFIX}/mu/${MUCOMMIT}/share/emacs/site-lisp/mu/emacs/site-lisp/mu4e ${LISPDIR}/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment