From 4b4975df8a8354baa162fcb82463abb31fabc692 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 12 Jun 2021 00:55:48 -0400 Subject: [PATCH] FIX provide path for home --- dot_bin/executable_bootstrap_pkgs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dot_bin/executable_bootstrap_pkgs b/dot_bin/executable_bootstrap_pkgs index d34838d..04dc1cc 100644 --- a/dot_bin/executable_bootstrap_pkgs +++ b/dot_bin/executable_bootstrap_pkgs @@ -12,6 +12,13 @@ # permissions in sudoers. pkgsrc_dir="$1" + +if [[ -z "${2+set}" ]]; then + install_root="$HOME" +else + install_root="$2" +fi + makepkg_tmp=/tmp/bootstrap-makepkg mk_makepkg_dir() { @@ -34,8 +41,8 @@ call_makepkg() { } run_install_scripts() { - ~/.config/rofi-extras/install_deps - ~/.config/xmonad/install_deps + "$install_root/.config/rofi-extras/install_deps" + "$install_root/.config/xmonad/install_deps" } run_yay() { @@ -57,8 +64,7 @@ run_yay() { ## AUR pkgs needed for spotify spotify_pkgs=(gconf) - MAKEFLAGS="-j$(nproc)" \ - yay --needed --noconfirm --norebuild --removemake -S \ + yay --needed --noconfirm --norebuild --removemake -S \ "${dunst_pkgs[@]}" \ "${emacs_pkgs[@]}" \ "${gtk_pkgs[@]}" \ @@ -92,12 +98,14 @@ clean_up() { trap 'clean_up' ERR if [ "$#" -ne 1 ]; then - echo "Usage: bootstrap_pkgs [CUSTOM_PKGBUILD_SRC]" + echo "Usage: bootstrap_pkgs CUSTOM_PKGBUILD_SRC [INSTALL_ROOT]" exit 1 fi try_update +run_install_scripts + run_yay mk_makepkg_dir