From 5a5afbacbe3041d246122f0968078af22e1ce57c Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Tue, 5 Dec 2023 18:07:50 +0000 Subject: [PATCH] Latest --- home/.chezmoidata.yaml | 15 +++++++++++++-- .../run_before_01-system-homebrew.sh.tmpl | 2 +- .../universal/run_onchange_after_69-emsdk.sh.tmpl | 2 +- .../run_onchange_after_98-cleanup.sh.tmpl | 5 ++++- home/.chezmoitemplates/universal/profile-inline | 4 ++-- .../bin/executable_gitomatic-service.tmpl | 5 +---- ...a-install-plugin.tmpl => symlink_idea.sh.tmpl} | 0 7 files changed, 22 insertions(+), 11 deletions(-) rename home/dot_local/bin/{executable_idea-install-plugin.tmpl => symlink_idea.sh.tmpl} (100%) diff --git a/home/.chezmoidata.yaml b/home/.chezmoidata.yaml index 8ff61960..c318c1ad 100644 --- a/home/.chezmoidata.yaml +++ b/home/.chezmoidata.yaml @@ -1733,10 +1733,21 @@ softwarePlugins: - github/gh-net - mislav/gh-cp intellij-idea-ce: - cmd: bash -c 'idea.sh installPlugins "{PLUGIN}"' + cmd: bash -c 'if ! cat "${XDG_CACHE_HOME:-$HOME/.cache}/install.doctor/intellij-idea-ce" | grep "${PLUGIN}" &> /dev/null; thenidea.sh installPlugins "{PLUGIN}" && mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/install.doctor" && echo "{PLUGIN}" >> "${XDG_CACHE_HOME:-$HOME/.cache}/install.doctor/intellij-idea-ce"; fi' plugins: + - AngularJS + - app.pieces.plugins.jetbrains + - com.dmarcotte.handlebars - com.github.copilot - - https://plugins.jetbrains.com/plugin/17328-pieces--save-search-share--reuse-code-snippets + - com.jetbrains.edu + - com.jetbrains.rust + - com.wakatime.intellij.plugin + - Docker + - io.flutter + - NodeJS + - org.editorconfig.editorconfigjetbrains + - org.intellij.plugins.markdown + - org.jetbrains.completion.full.line helm: cmd: bash -c '{PLUGIN}' plugins: diff --git a/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl b/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl index 85aefcc9..5bd3afdd 100644 --- a/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl @@ -118,6 +118,7 @@ ensurePackageManagerHomebrew() { bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || BREW_EXIT_CODE="$?" if [ -n "$BREW_EXIT_CODE" ]; then logg warn 'Homebrew was installed but part of the installation failed to complete successfully.' + fixHomebrewPermissions fi fi fi @@ -127,7 +128,6 @@ ensurePackageManagerHomebrew() { loadLinuxbrew ensurePackageManagerHomebrew loadLinuxbrew -fixHomebrewPermissions ### Enable auto-update service if [ -d /Applications ] && [ -d System ]; then diff --git a/home/.chezmoiscripts/universal/run_onchange_after_69-emsdk.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_69-emsdk.sh.tmpl index c021ed47..6d395928 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_69-emsdk.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_69-emsdk.sh.tmpl @@ -12,7 +12,7 @@ {{ includeTemplate "universal/logg" }} if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/emsdk" ]; then - logg info 'Pulling latest changes for Emscripten source code' && git pull + logg info 'Pulling latest changes for Emscripten source code' && cd "${XDG_DATA_HOME:-$HOME/.local/share}/emsdk" && git pull logg info "Running emsdk install latest" && emsdk install latest > /dev/null logg info "Running emsdk activate latest" && emsdk activate latest > /dev/null logg info 'Profile source inclusions are already implemented in Bash / ZSH profile' diff --git a/home/.chezmoiscripts/universal/run_onchange_after_98-cleanup.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_98-cleanup.sh.tmpl index 277d8c22..4f291d45 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_98-cleanup.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_98-cleanup.sh.tmpl @@ -37,7 +37,10 @@ if [ -d /Applications ] && [ -d /System ]; then logg info 'Emptying trash' && m trash clean fi logg info 'Checking if there is a pending update' - defaults read /Library/Updates/index.plist InstallAtLogout + defaults read /Library/Updates/index.plist InstallAtLogout || EXIT_CODE=$? + if [ -n "$EXIT_CODE" ]; then + logg info 'No pending update discovered by checking /Library/Updates/index.plist' + fi elif [ -f /var/run/reboot-required ]; then logg info '/var/run/reboot-required is present so a reboot is required' fi diff --git a/home/.chezmoitemplates/universal/profile-inline b/home/.chezmoitemplates/universal/profile-inline index d1de5911..82dca427 100644 --- a/home/.chezmoitemplates/universal/profile-inline +++ b/home/.chezmoitemplates/universal/profile-inline @@ -23,8 +23,8 @@ if [ -d "/home/linuxbrew/.linuxbrew/bin" ]; then export WHALEBREW_INSTALL_PATH="/home/linuxbrew/.linuxbrew/whalebrew" elif [ -f "/usr/local/bin/brew" ]; then eval "$(/usr/local/bin/brew shellenv)" -elif [ -f "/opt/homebrew/bin/brew" ]; then - eval "$(/opt/homebrew/bin/brew shellenv)" +elif [ -f "${HOMEBREW_PREFIX:-/opt/homebrew}/bin/brew" ]; then + eval "$("${HOMEBREW_PREFIX:-/opt/homebrew}/bin/brew" shellenv)" fi export HOMEBREW_NO_ANALYTICS=1 diff --git a/home/dot_local/bin/executable_gitomatic-service.tmpl b/home/dot_local/bin/executable_gitomatic-service.tmpl index 4f585f3d..3f7d3073 100644 --- a/home/dot_local/bin/executable_gitomatic-service.tmpl +++ b/home/dot_local/bin/executable_gitomatic-service.tmpl @@ -12,9 +12,6 @@ # # [Systemd Unit file](https://github.com/megabyte-labs/install.doctor/blob/master/home/dot_config/gitomatic/gitomatic.service.tmpl) -{{ includeTemplate "universal/profile" }} -{{ includeTemplate "universal/logg" }} - if command -v gitomatic > /dev/null && command -v jq > /dev/null && command -v yq > /dev/null && command -v git > /dev/null; then if [ -d /Applications ] && [ -d /System ]; then USER_FOLDER="/Users" @@ -52,5 +49,5 @@ if command -v gitomatic > /dev/null && command -v jq > /dev/null && command -v y done fi else - logg error 'gitomatic, jq, yq, and git should be installed!' && exit 1 + echo 'gitomatic, jq, yq, and git should be installed!' && exit 1 fi diff --git a/home/dot_local/bin/executable_idea-install-plugin.tmpl b/home/dot_local/bin/symlink_idea.sh.tmpl similarity index 100% rename from home/dot_local/bin/executable_idea-install-plugin.tmpl rename to home/dot_local/bin/symlink_idea.sh.tmpl