diff --git a/dot_bin/executable_bootstrap_pkgs b/dot_bin/executable_bootstrap_pkgs index c5ff0fe..e6eb2b8 100644 --- a/dot_bin/executable_bootstrap_pkgs +++ b/dot_bin/executable_bootstrap_pkgs @@ -63,8 +63,9 @@ run_yay() { ## packages for emacs (install emacs first to read the config) pacman --needed -S emacs - sudo -u "$home_user" emacs -batch -l "$emacs_dir/init.el" --eval \ - '(print (format "pkgs: %s" (s-join " " (nd/get-aur-dependencies t))))' + # call emacs once to initialize it + sudo -u "$home_user" emacs -batch -l "$emacs_dir/init.el" + # get a list of packages emacs needs IFS=' ' read -r -a emacs_pkgs \ < <(sudo -u "$home_user" emacs -batch -l "$emacs_dir/init.el" --eval \ '(print (format "pkgs: %s" (s-join " " (nd/get-aur-dependencies t))))' \ diff --git a/run_once_after_10_install-packages.sh b/run_once_after_10_install-packages.sh index 196ad27..b8cb1df 100644 --- a/run_once_after_10_install-packages.sh +++ b/run_once_after_10_install-packages.sh @@ -52,7 +52,7 @@ sudo "$HOME/.bin/bootstrap_pkgs" "$(whoami)" "$HOME/.local/share/packages" "$ema IFS=' ' read -r -a emacs_stack_pkgs \ < <(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 | \ sed -n -e 's/"pkgs: \(.*\)"/\1/p') echo "Emacs requires the following Haskell packages: ${emacs_stack_pkgs[*]}"