dotfiles

🎜 Clone'em, tweak'em, stick'em in your $HOME 🎝
git clone https://git.kevinlegouguec.net/dotfiles
Log | Files | Refs | README

emacs-install (437B)


      1 #!/bin/bash
      2 
      3 set -eux
      4 
      5 build_dir=${EMACS_BUILD:-.}
      6 
      7 cd "${build_dir}"
      8 make install
      9 
     10 # Retrieve installation directory.  Many ways to do this; parsing
     11 # 'config.status --config' might be TRT in principle; for simplicity,
     12 # just:
     13 prefix_dir=$(sed -n s/'^prefix *= *'//p Makefile)
     14 apps_dir=~/apps
     15 
     16 case ${prefix_dir}
     17 in
     18     ${apps_dir}/*) target=${prefix_dir##${apps_dir}/} ;;
     19     *) exit ;;
     20 esac
     21 
     22 cd ${apps_dir}
     23 ln -fsvT "${target}" emacs