diff --git a/base/zshenv b/base/zshenv index 8f0793d..891367d 100644 --- a/base/zshenv +++ b/base/zshenv @@ -16,4 +16,4 @@ export XDG_BIN_HOME="$HOME/.local/bin" export XDG_CACHE_HOME="$HOME/.cache" export XDG_RUNTIME_DIR="$HOME/.local/run" -source "$DOTFILES/config/shared" +eval "$DOTFILES/config/shared.sh" diff --git a/scripts/create-nvim-keymaps.sh b/scripts/create-nvim-keymaps.sh index 4995569..f78bbef 100755 --- a/scripts/create-nvim-keymaps.sh +++ b/scripts/create-nvim-keymaps.sh @@ -2,10 +2,7 @@ # Create file containing key mappings for Neovim # Usage: ./create-nvim-keymaps.sh -source "$HOME/.dotfiles/scripts/shared.sh" -source "$HOME/.dotfiles/config/exports" -source "$HOME/.dotfiles/config/alias" -source "$HOME/.dotfiles/config/functions" +eval "$HOME/.dotfiles/scripts/shared.sh" DEST="$HOME/.dotfiles/docs/nvim-keybindings.md" diff --git a/scripts/create-omp-screenshot.sh b/scripts/create-omp-screenshot.sh index 93af0fb..125b410 100755 --- a/scripts/create-omp-screenshot.sh +++ b/scripts/create-omp-screenshot.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" set -e cd "$DOTFILES" || exit diff --git a/scripts/install-asdf.sh b/scripts/install-asdf.sh index 519974a..25c6962 100755 --- a/scripts/install-asdf.sh +++ b/scripts/install-asdf.sh @@ -2,7 +2,7 @@ # # Install asdf -source "${XDG_CONFIG_HOME}/shared" +source "${XDG_CONFIG_HOME}/shared.sh" source "${DOTFILES}/scripts/shared.sh" export ASDF_DIR="${XDG_BIN_HOME}/asdf" diff --git a/scripts/install-cargo-packages.sh b/scripts/install-cargo-packages.sh index 60eeb19..047130c 100755 --- a/scripts/install-cargo-packages.sh +++ b/scripts/install-cargo-packages.sh @@ -2,27 +2,12 @@ # Install cargo/rust packages. # # shellcheck source=shared.sh -source "$HOME/.dotfiles/config/exports" -source "$HOME/.dotfiles/config/alias" -source "$HOME/.dotfiles/config/functions" -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" msg "Starting to install rust/cargo packages" -! x-have cargo && { - msg "cargo could not be found. installing cargo with rustup.rs" - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y -} - source "$CARGO_HOME/env" -! x-have rustup && { - msg_err "rustup could not be found. Aborting..." - exit 1 -} - -rustup default stable - # If we have cargo install-update, use it first x-have cargo-install-update && { msg_run "Updating cargo packages with cargo install-update" diff --git a/scripts/install-cheat-purebashbible.sh b/scripts/install-cheat-purebashbible.sh index 29daafd..a0d0af0 100755 --- a/scripts/install-cheat-purebashbible.sh +++ b/scripts/install-cheat-purebashbible.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # shellcheck disable=SC2231,SC2034,SC2181,SC2068 # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" PBB_REQUIRED_TOOLS=(git cheat) for t in ${PBB_REQUIRED_TOOLS[@]}; do diff --git a/scripts/install-composer.sh b/scripts/install-composer.sh index b77c6e3..1c130b6 100755 --- a/scripts/install-composer.sh +++ b/scripts/install-composer.sh @@ -2,7 +2,7 @@ # Install PHP Package Manager Composer # # shellcheck source="shared.sh" -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" ! x-have "php" && msg_err "PHP Not Available, cannot install composer" && exit 0 diff --git a/scripts/install-fonts.sh b/scripts/install-fonts.sh index b4c3994..e282ef3 100755 --- a/scripts/install-fonts.sh +++ b/scripts/install-fonts.sh @@ -2,7 +2,7 @@ # Install NerdFonts # # shellcheck source="shared.sh" -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" GIT_REPO="https://github.com/ryanoasis/nerd-fonts.git" TMP_PATH="$XDG_CACHE_HOME/nerd-fonts" diff --git a/scripts/install-fzf.sh b/scripts/install-fzf.sh index c7ffc63..4eae119 100755 --- a/scripts/install-fzf.sh +++ b/scripts/install-fzf.sh @@ -3,7 +3,7 @@ # Install fzf # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" FZF_GIT="https://github.com/junegunn/fzf.git" FZF_PATH="${XDG_CONFIG_HOME}/fzf" diff --git a/scripts/install-gh-extensions.sh b/scripts/install-gh-extensions.sh index e307859..2c62df6 100755 --- a/scripts/install-gh-extensions.sh +++ b/scripts/install-gh-extensions.sh @@ -2,7 +2,7 @@ # Install GitHub CLI extensions # # shellcheck source="shared.sh" -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" msg_run "Installing gh (GitHub Client) extensions" diff --git a/scripts/install-git-crypt.sh b/scripts/install-git-crypt.sh index e7c0a3b..9ba9dae 100755 --- a/scripts/install-git-crypt.sh +++ b/scripts/install-git-crypt.sh @@ -4,7 +4,7 @@ # NOTE: Experimental, wip # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" msg_run "Installing git-crypt" diff --git a/scripts/install-go-packages.sh b/scripts/install-go-packages.sh index ffcb05e..477702e 100755 --- a/scripts/install-go-packages.sh +++ b/scripts/install-go-packages.sh @@ -2,7 +2,7 @@ # Install Go packages # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" msg_run "Installing go packages" diff --git a/scripts/install-neofetch.sh b/scripts/install-neofetch.sh index 290acae..0206536 100755 --- a/scripts/install-neofetch.sh +++ b/scripts/install-neofetch.sh @@ -3,7 +3,7 @@ # Install neofetch from source # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" NEOFETCH_VERSION="7.1.0" NEOFETCH_REPO="https://github.com/dylanaraps/neofetch" diff --git a/scripts/install-npm-packages.sh b/scripts/install-npm-packages.sh index d2c2774..a6e96ad 100755 --- a/scripts/install-npm-packages.sh +++ b/scripts/install-npm-packages.sh @@ -2,7 +2,7 @@ # Install npm packages globally. # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" msg "Starting to install npm packages" diff --git a/scripts/install-ntfy.sh b/scripts/install-ntfy.sh index 5e6c39c..6108196 100755 --- a/scripts/install-ntfy.sh +++ b/scripts/install-ntfy.sh @@ -3,7 +3,7 @@ # Install ntfy # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" set -e x-have "ntfy" && msg "ntfy already installed" && exit 0 diff --git a/scripts/install-ohmybash.sh b/scripts/install-ohmybash.sh index 21f2eba..cefad03 100755 --- a/scripts/install-ohmybash.sh +++ b/scripts/install-ohmybash.sh @@ -3,7 +3,7 @@ # Install oh-my-bash # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" export OSH="$HOME/.local/share/oh-my-bash" diff --git a/scripts/install-ohmyposh.sh b/scripts/install-ohmyposh.sh index b2a37ed..9e7c78e 100755 --- a/scripts/install-ohmyposh.sh +++ b/scripts/install-ohmyposh.sh @@ -3,7 +3,7 @@ # Install oh-my-posh # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/.local/bin diff --git a/scripts/install-pip-packages.sh b/scripts/install-pip-packages.sh index 1caf803..5ebd67a 100755 --- a/scripts/install-pip-packages.sh +++ b/scripts/install-pip-packages.sh @@ -2,7 +2,7 @@ # Install python/pip packages. # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" msg "Starting to install pip packages" diff --git a/scripts/install-z.sh b/scripts/install-z.sh index 751680d..b1c5cb6 100755 --- a/scripts/install-z.sh +++ b/scripts/install-z.sh @@ -3,7 +3,7 @@ # Install z # # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" Z_GIT_PATH="https://github.com/rupa/z.git" Z_BIN_PATH="$XDG_BIN_HOME/z" diff --git a/scripts/set-macos-defaults.sh b/scripts/set-macos-defaults.sh index 4d392a0..8842165 100755 --- a/scripts/set-macos-defaults.sh +++ b/scripts/set-macos-defaults.sh @@ -9,7 +9,7 @@ [ "$(uname)" != "Darwin" ] && echo "Not a macOS system" && exit 0 # shellcheck source=shared.sh -source "$HOME/.dotfiles/scripts/shared.sh" +eval "$HOME/.dotfiles/scripts/shared.sh" msg_run "Starting to set macOS defaults, these require sudo privileges:" diff --git a/scripts/shared.sh b/scripts/shared.sh index 5b48c8a..1b5cd51 100755 --- a/scripts/shared.sh +++ b/scripts/shared.sh @@ -12,7 +12,7 @@ || [[ -n $BASH_VERSION ]] && (return 0 2> /dev/null) ) && sourced=1 || sourced=0 -source "$HOME/.dotfiles/config/shared.sh" +eval "$HOME/.dotfiles/config/shared.sh" DOTFILES_CURRENT_SHELL=$(ps -p $$ -oargs=) export DOTFILES_CURRENT_SHELL