diff --git a/home/.chezmoiscripts/universal/run_onchange_after_57-netdata.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_57-netdata.sh.tmpl index d70a294f..7619a5e1 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_57-netdata.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_57-netdata.sh.tmpl @@ -23,12 +23,12 @@ if command -v netdata-claim.sh > /dev/null; then fi ### Ensure /usr/local/var/lib/netdata/cloud.d is owned by user - if [ -d /usr/local/var/lib/netdata/cloud.d ]; then - logg info 'Ensuring permissions are correct on /usr/local/var/lib/netdata/cloud.d' - sudo chown -Rf $USER /usr/local/var/lib/netdata/cloud.d - elif [ -d /var/lib/netdata/cloud.d ]; then - logg info 'Ensuring permissions are correct on /var/lib/netdata/cloud.d' - sudo chown -Rf $USER /var/lib/netdata/cloud.d + if [ -d /usr/local/var/lib/netdata ]; then + logg info 'Ensuring permissions are correct on /usr/local/var/lib/netdata' + sudo chown -Rf netdata:netdata /usr/local/var/lib/netdata + elif [ -d /var/lib/netdata ]; then + logg info 'Ensuring permissions are correct on /var/lib/netdata' + sudo chown -Rf netdata:netdata /var/lib/netdata fi # netdata-claim.sh must be run as netdata user 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 239b68db..f8931d94 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 @@ -57,9 +57,7 @@ if command -v powerline > /dev/null && [ -f "$HOME/.bashrc" ]; then ### Ensure plugins are enabled logg info 'Enabling bash-it plugins' # TODO: Move these plugins to the .chezmoidata.yaml - # Plugin: xterm causing following error so it was removed - # ble: Please run `stty sane' to recover the correct TTY state. - for PLUGIN in base blesh browser cht-sh dirs gitstatus powerline sudo; do + for PLUGIN in base blesh browser cht-sh dirs gitstatus powerline sudo xterm; do if ls "$BASH_IT/enabled" | grep "$PLUGIN" > /dev/null; then rm -f "$BASH_IT/enabled/"*"$PLUGIN"* > /dev/null && logg info "Removed old $PLUGIN bash-it plugin symlink" || logg error "Failed to remove $PLUGIN bash-it plugin symlink" fi @@ -68,6 +66,7 @@ if command -v powerline > /dev/null && [ -f "$HOME/.bashrc" ]; then else logg warn 'The path specified by BASH_IT does not exist yet' fi + exit 0 else if ! command -v powerline > /dev/null; then logg warn '`powerline` is not available' diff --git a/home/.chezmoiscripts/universal/run_onchange_after_97-cloudflare.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_97-cloudflare.sh.tmpl index d574d0ef..9c02d385 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_97-cloudflare.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_97-cloudflare.sh.tmpl @@ -248,13 +248,13 @@ if command -v cloudflared > /dev/null && [ -d "$HOME/.local/etc/cloudflared" ]; sudo cp -f "$HOME/.local/etc/cloudflared/config.yml" /usr/local/etc/cloudflared/config.yml # Register tunnel (if not already registered) - if cloudflared tunnel list | grep "host-{{ .host.hostname }}"; then + if sudo cloudflared tunnel list | grep "host-{{ .host.hostname }}" > /dev/null; then logg info 'CloudFlare tunnel is already registered' else logg info 'Creating a CloudFlare tunnel to this host' sudo cloudflared tunnel create "host-{{ .host.hostname }}" fi - TUNNEL_ID="$(cloudflared tunnel list | grep "host-{{ .host.hostname }}" | sed 's/ .*//')" + TUNNEL_ID="$(sudo cloudflared tunnel list | grep "host-{{ .host.hostname }}" | sed 's/ .*//')" logg info "Tunnel ID: $TUNNEL_ID" if [ -f "/usr/local/etc/cloudflared/${TUNNEL_ID}.json" ]; then logg info 'Symlinking tunnel configuration to /usr/local/etc/cloudflared/credentials.json' diff --git a/home/dot_bashrc b/home/dot_bashrc index fa4ed84e..ebab3950 100644 --- a/home/dot_bashrc +++ b/home/dot_bashrc @@ -22,6 +22,11 @@ if [ -f /etc/bashrc ]; then . /etc/bashrc fi +### Java (asdf) +if [ -f "$ASDF_DATA_DIR/plugins/java/set-java-home.bash" ]; then + . "$ASDF_DATA_DIR/plugins/java/set-java-home.bash" +fi + ### Escape if shell not interactive case $- in *i*) ;; @@ -111,11 +116,6 @@ if [ "$BASH_SUPPORT" = 'true' ]; then . "$HOME/.local/scripts/iterm2.bash" fi - ### Java (asdf) - if [ -f "$ASDF_DATA_DIR/plugins/java/set-java-home.bash" ]; then - . "$ASDF_DATA_DIR/plugins/java/set-java-home.bash" - fi - ### Fig if [ -f "$HOME/.fig/shell/bashrc.post.bash" ]; then . "$HOME/.fig/shell/bashrc.post.bash" diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index 95524ded..b0ba5a05 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -766,7 +766,7 @@ async function beforeInstall(packageManager) { log('error', 'Homebrew', 'Failed running brew update / upgrade') log('info', 'Homebrew', 'Running brew tap --repair and trying again') try { - runCommand('Repairing taps and retrying brew update / upgrade', 'brew tap --repair && brew update && brew upgrade --cask --greedy && brew upgrade --force --greedy') + runCommand('Repairing taps and retrying brew update / upgrade', 'rm -rf $(brew --cache) && brew tap --repair && brew update && brew upgrade --cask --greedy && brew upgrade --force --greedy') } catch (e) { console.log(e) log('error', 'Homebrew', 'Failed both attempts to run brew update / upgrade') @@ -1717,7 +1717,7 @@ async function pruneInstallOrders(installOrders) { try { await $`cat ${pkgTmp} | grep '^${pkg}$'` log('info', 'Filter', 'Filtering list') - newVal = newVal.filter((x) => x === pkg) + newVal = newVal.filter((x) => x !== pkg) console.log('New list', newVal) } catch (e) { // Do nothing diff --git a/software.yml b/software.yml index 3ae8bb40..80ee6326 100644 --- a/software.yml +++ b/software.yml @@ -723,7 +723,7 @@ softwarePackages: catlight: _github: https://github.com/catlightio/CatLight _name: Catlight - when: '! test -d /Applications/Catlight.app && ! test -d $HOME/Applications/Catlight.app' + _when: '! test -d /Applications/Catlight.app && ! test -d "$HOME/Applications/Catlight.app"' cask: catlight deb: https://catlight.io/downloads/linux/beta d2vm: @@ -2887,13 +2887,13 @@ softwarePackages: snap: ffsend yay: ffsend fig: + _bin: fig _desc: '[Fig](https://fig.io/) adds autocomplete to your terminal. As you type, Fig pops up subcommands, options, and contextually relevant arguments in your existing terminal.' _docs: https://fig.io/user-manual _github: https://github.com/withfig/autocomplete _home: https://fig.io/ _name: Fig _when:cask: '! test -d "/Applications/Fig.app" && ! test -d "$HOME/Applications/Fig.app"' - ansible:darwin: professormanhattan.fig cask: fig steampipe: _bin: steampipe @@ -4495,7 +4495,6 @@ softwarePackages: _github: https://github.com/ipfs/ipfs _home: https://ipfs.tech/ _name: IPFS - _service: ipfs brew: ipfs choco: go-ifps nix: ipfs