From 82d20ca47c62e9566574d8b0a1ddf2be3706681a Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Wed, 6 Dec 2023 03:16:31 +0000 Subject: [PATCH] Latest --- .../universal/run_onchange_after_40-firefox.sh.tmpl | 3 +++ .../run_onchange_after_80-bash-completions.sh.tmpl | 1 + .../universal/run_onchange_after_94-bash-it.sh.tmpl | 8 ++------ software.yml | 11 ++++++++++- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl index 5e2e3590..c149939e 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl @@ -302,6 +302,9 @@ function firefoxSetup() { PLUGIN_HTML="$(mktemp)" curl --silent "https://addons.mozilla.org/en-US/firefox/addon/$FIREFOX_PLUGIN/" > "$PLUGIN_HTML" PLUGIN_TMP="$(mktemp)" + if ! command -v htmlq > /dev/null && command -v brew > /dev/null; then + logg info 'Installing htmlq using Homebrew since it is a dependency for populating Firefox add-ons' && brew install htmlq + fi cat "$PLUGIN_HTML" | htmlq '#redux-store-state' | sed 's/^//' | sed 's/<\/script>$//' > "$PLUGIN_TMP" PLUGIN_ID="$(jq '.addons.bySlug["'"$FIREFOX_PLUGIN"'"]' "$PLUGIN_TMP")" if [ "$PLUGIN_ID" != 'null' ]; then diff --git a/home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.sh.tmpl index 2005b0f1..a20fde50 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.sh.tmpl @@ -17,6 +17,7 @@ logg 'Updating the ~/.local/share/bash-completion/completions folder based on th if [ "$DEBUG_MODE" == 'true' ]; then set +x fi +set +x ### Initialize COMPLETION_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions" diff --git a/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl index 2330a1c7..cca3211c 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl @@ -1,10 +1,10 @@ {{- if (ne .host.distro.family "windows") -}} -#!/usr/bin/env -S bash -i +#!/usr/bin/env bash # @file Bash It! # @brief Ensures Bash is configured to use Bash It! # @description # This script ensures Bash is configured to use Bash It! It ensures dependencies are installed, installs completions, -# and enables Bash It! plugins. The completions and plugins are hardcoded in this script. +# and enables Bash It! plugins. The completions and plugins are hardcoded in this script. Source file might need `#!/usr/bin/env -S bash -i`. {{ includeTemplate "universal/profile" }} {{ includeTemplate "universal/logg" }} @@ -31,10 +31,6 @@ fi ### Bash-it completions / plugins if command -v powerline > /dev/null && [ -f "$HOME/.bashrc" ]; then - # These three lines are probably not needed: - # logg info 'Running source ~/.bashrc' - # source ~/.bashrc - # logg success 'Imported the ~/.bashrc profile' if [ -d "$BASH_IT" ]; then ### Ensure bash-it is installed if ! command -v bash-it > /dev/null; then diff --git a/software.yml b/software.yml index 628c7378..299930a9 100644 --- a/software.yml +++ b/software.yml @@ -8178,7 +8178,16 @@ softwarePackages: _home: https://rkhunter.sourceforge.net/ _name: rkhunter _notes: The _post script removes an entry for VMware with a space in it that causes rkhunter to hiccup - _post: export PATH="$(echo "$PATH" | sed 's/VMware Fusion.app//')" && sudo rkhunter --propupd && sudo rkhunter --update + _post: | + export PATH="$(echo "$PATH" | sed 's/VMware Fusion.app/VMwareFusion.app/')" + sudo rkhunter --propupd || RK_PROPUPD_EXIT_CODE=$? + if [ -n "$RK_PROPUPD_EXIT_CODE" ]; then + echo "FIXME sudo rkhunter --propupd returned non-zero exit code" + fi + sudo rkhunter --update || RK_UPDATE_EXIT_CODE=$? + if [ -n "$RK_UPDATE_EXIT_CODE" ]; then + echo "FIXME sudo rkhunter --update returned non-zero exit code" + fi _service:pacman: cronie apt: rkhunter brew: rkhunter