splitting into more modular structure

This commit is contained in:
2019-12-08 15:38:09 -08:00
parent ab1ef3fcbb
commit 1762d6246f
8 changed files with 39 additions and 6 deletions

6
bash.d/00-init.sh Normal file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
# shellcheck disable=SC2034
DOTFILES=$( cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd || return)
SUBMODULES=$( cd "$DOTFILES/submodules" && pwd)

5
bash.d/10-dotenv.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
function dotenv {
export "$(grep -E -v '^#' .env | xargs)"
}

View File

@@ -0,0 +1 @@
export DOTNET_CLI_TELEMETRY_OPTOUT=1

11
bash.d/10-prompt.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
PROMPT_SUBMODULE="${SUBMODULES}/romkatv-gitstatus"
if ls -A "$PROMPT_SUBMODULE"; then
git submodule init
git submodule update
fi
# shellcheck disable=SC1090
source "$PROMPT_SUBMODULE/gitstatus.prompt.sh"