diff options
| author | Kรฉvin Le Gouguec <kevin.legouguec@gmail.com> | 2025-01-26 17:09:58 +0100 |
|---|---|---|
| committer | Kรฉvin Le Gouguec <kevin.legouguec@gmail.com> | 2025-01-26 17:09:58 +0100 |
| commit | b4a76491970d4ebaab7c7c8af1ccb10212c01d68 (patch) | |
| tree | a92517464534f9ec5bac5cbd403a0b121f2f04b9 /.local/bin | |
| parent | a6f72ff67bb6aec6686b84df45098bffb13f91d1 (diff) | |
| download | dotfiles-b4a76491970d4ebaab7c7c8af1ccb10212c01d68.tar.xz | |
Automate some Emacs installation tedium
Mostly to stop feeling guilty about not first-trying the ln
invocation. Of course now I feel guilty about my half-assed prefix
parsing.
C'est la vie ๐ง
Diffstat (limited to '.local/bin')
| -rwxr-xr-x | .local/bin/emacs-install | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.local/bin/emacs-install b/.local/bin/emacs-install new file mode 100755 index 0000000..b8a98aa --- /dev/null +++ b/.local/bin/emacs-install @@ -0,0 +1,19 @@ +#!/bin/bash + +set -eux + +build=${EMACS_BUILD:-.} + +# Retrieve installation directory. Many ways to do this; parsing +# 'config.status --config' might be TRT in principle; for simplicity, +# just: +prefix=$(sed -n s/'^prefix *= *'//p "${build}"/Makefile) + +cd "${build}" +make install + +[[ ${prefix} =~ ~/apps/(.*) ]] || exit +target=${BASH_REMATCH[1]} + +cd ~/apps +ln -fsvT "${target}" emacs |
