diff --git a/default/makepkg/blob-parallel.conf b/default/makepkg/blob-parallel.conf new file mode 100644 index 0000000..06c44a5 --- /dev/null +++ b/default/makepkg/blob-parallel.conf @@ -0,0 +1 @@ +MAKEFLAGS="-j$(nproc)" diff --git a/install.sh b/install.sh index ac58455..41ec49d 100755 --- a/install.sh +++ b/install.sh @@ -80,6 +80,7 @@ install_bar_widgets remove_omarchy_font refresh_font_cache install_shell_profile +install_makepkg_config install_bash_integration install_user_units install_systemd_dropins diff --git a/install/steps/config.sh b/install/steps/config.sh index 6fbfda8..904d4a0 100644 --- a/install/steps/config.sh +++ b/install/steps/config.sh @@ -7,7 +7,7 @@ # having run first. link_blob_path() { local current="" - [[ -L $blob_path ]] && current="$(readlink -f "$blob_path")" + [[ -L $blob_path ]] && current="$(readlink -f "$blob_path" || true)" if [[ $current == "$repo_dir" ]]; then say "ok BLOB_PATH -> $repo_dir" @@ -125,6 +125,11 @@ install_shell_profile() { install_root_file "$repo_dir/session/profile.sh" /etc/profile.d/blob.sh "profile.d/blob.sh" } +install_makepkg_config() { + install_root_file "$repo_dir/default/makepkg/blob-parallel.conf" \ + /etc/makepkg.conf.d/blob-parallel.conf "makepkg.conf.d/blob-parallel.conf" +} + install_zen_config() { local profile profile="$(find "$config_dir/zen" -maxdepth 1 -type d -name '*.Default (release)*' 2>/dev/null | head -1)" diff --git a/install/steps/theme.sh b/install/steps/theme.sh index 87c4fdb..1bd9fa8 100644 --- a/install/steps/theme.sh +++ b/install/steps/theme.sh @@ -9,7 +9,7 @@ link_wallpapers() { local source="$repo_dir/wallpapers" local current="" - [[ -L $wallpaper_dir ]] && current="$(readlink -f "$wallpaper_dir")" + [[ -L $wallpaper_dir ]] && current="$(readlink -f "$wallpaper_dir" || true)" if [[ $current == "$source" ]]; then say "ok wallpapers" diff --git a/session/env-bootstrap b/session/env-bootstrap index e89104e..7708e22 100644 --- a/session/env-bootstrap +++ b/session/env-bootstrap @@ -14,3 +14,10 @@ case ":$PATH:" in *) PATH="${PATH:+$PATH:}$HOME/.local/bin" ;; esac export PATH + +cpu_cores=$(nproc 2>/dev/null || echo 1) +: "${MAKEFLAGS:=-j$cpu_cores}" +: "${CMAKE_BUILD_PARALLEL_LEVEL:=$cpu_cores}" +: "${CARGO_BUILD_JOBS:=$cpu_cores}" +export MAKEFLAGS CMAKE_BUILD_PARALLEL_LEVEL CARGO_BUILD_JOBS +unset cpu_cores