chore(scripts): eval scripts/shared.sh

This commit is contained in:
2024-07-17 10:04:16 +03:00
parent 8a3b2e703c
commit adecceda7a
21 changed files with 21 additions and 39 deletions

View File

@@ -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"

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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"

View File

@@ -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:"

View File

@@ -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