This commit is contained in:
Nathan Dwarshuis 2021-03-13 21:18:03 -05:00
parent 68ff90ba65
commit 5757c4532b
2 changed files with 4 additions and 3 deletions

View File

@ -63,8 +63,9 @@ run_yay() {
## packages for emacs (install emacs first to read the config) ## packages for emacs (install emacs first to read the config)
pacman --needed -S emacs pacman --needed -S emacs
sudo -u "$home_user" emacs -batch -l "$emacs_dir/init.el" --eval \ # call emacs once to initialize it
'(print (format "pkgs: %s" (s-join " " (nd/get-aur-dependencies t))))' sudo -u "$home_user" emacs -batch -l "$emacs_dir/init.el"
# get a list of packages emacs needs
IFS=' ' read -r -a emacs_pkgs \ IFS=' ' read -r -a emacs_pkgs \
< <(sudo -u "$home_user" emacs -batch -l "$emacs_dir/init.el" --eval \ < <(sudo -u "$home_user" emacs -batch -l "$emacs_dir/init.el" --eval \
'(print (format "pkgs: %s" (s-join " " (nd/get-aur-dependencies t))))' \ '(print (format "pkgs: %s" (s-join " " (nd/get-aur-dependencies t))))' \

View File

@ -52,7 +52,7 @@ sudo "$HOME/.bin/bootstrap_pkgs" "$(whoami)" "$HOME/.local/share/packages" "$ema
IFS=' ' read -r -a emacs_stack_pkgs \ IFS=' ' read -r -a emacs_stack_pkgs \
< <(emacs -batch -l "$emacs_dir/init.el" --eval \ < <(emacs -batch -l "$emacs_dir/init.el" --eval \
'(print (format "phgs: %s" (s-join " " (nd/get-stack-dependencies))))' \ '(print (format "pkgs: %s" (s-join " " (nd/get-stack-dependencies))))' \
2>/dev/null | \ 2>/dev/null | \
sed -n -e 's/"pkgs: \(.*\)"/\1/p') sed -n -e 's/"pkgs: \(.*\)"/\1/p')
echo "Emacs requires the following Haskell packages: ${emacs_stack_pkgs[*]}" echo "Emacs requires the following Haskell packages: ${emacs_stack_pkgs[*]}"