diff options
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/emacs-build | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.local/bin/emacs-build b/.local/bin/emacs-build index 815b244..cbd39a6 100755 --- a/.local/bin/emacs-build +++ b/.local/bin/emacs-build @@ -10,6 +10,29 @@ configure_flags=( --with-xinput2 ) +is-rolling-distro () +{ + ( + . /etc/os-release + case "${ID}" + in + opensuse-tumbleweed) return 0;; + esac + return 1 + ) +} + +if ! is-rolling-distro +then + cachedir=${XDG_CACHE_HOME:-~/.cache}/emacs + test -d "${cachedir}" || mkdir -p "${cachedir}" + + thistree=${PWD#~} + cachefile=${cachedir}/config${thistree//\//,} + + configure_flags=(--cache-file="${cachefile}" "${configure_flags[@]}") +fi + if ! test -f Makefile then ${make} configure |
