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 119f5147..165d016a 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 @@ -45,11 +45,10 @@ if command -v powerline > /dev/null && [ -f "$HOME/.bashrc" ]; then fi ### Ensure completions are enabled - if [ -d "$BASH_IT/enabled" ]; then - logg info "Changing directory to $BASH_IT/enabled" && cd "$BASH_IT/enabled" - else - logg info "$BASH_IT/enabled not a directory yet" + if [ ! -d "$BASH_IT/enabled" ]; then + logg info "Creating the $BASH_IT/enabled directory" && mkdir -p "$BASH_IT/enabled" fi + logg info "Changing directory to $BASH_IT/enabled" && cd "$BASH_IT/enabled" logg info 'Enabling bash-it completions' # TODO: Move these plugins to the .chezmoidata.yaml for COMPLETION in defaults dirs docker docker-compose export git makefile ng ssh system vagrant; do 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 5e186a6f..1e826940 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_97-cloudflare.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_97-cloudflare.sh.tmpl @@ -268,6 +268,7 @@ if command -v cloudflared > /dev/null && [ -d "$HOME/.local/etc/cloudflared" ]; fi # Copy over configuration files + logg info 'Ensuring /usr/local/etc/cloudflared exists' && sudo mkdir -p /usr/local/etc/cloudflared logg info 'Copying over configuration files from ~/.local/etc/cloudflared to /usr/local/etc/cloudflared' sudo cp -f "$HOME/.local/etc/cloudflared/cert.pem" /usr/local/etc/cloudflared/cert.pem sudo cp -f "$HOME/.local/etc/cloudflared/config.yml" /usr/local/etc/cloudflared/config.yml