diff --git a/bashrc b/bashrc new file mode 100644 index 0000000..38d7d83 --- /dev/null +++ b/bashrc @@ -0,0 +1,20 @@ +# /etc/skel/.bashrc +# +# This file is sourced by all *interactive* bash shells on startup, +# including some apparently interactive shells such as scp and rcp +# that can't tolerate any output. So make sure this doesn't display +# anything or bad things will happen ! + + +# Test for an interactive shell. There is no need to set anything +# past this point for scp and rcp, and it's important to refrain from +# outputting anything in those cases. +if [[ $- != *i* ]] ; then + # Shell is non-interactive. Be done now! + return +fi + +for file in ~/.bashrc.d/*.bashrc; do + source "$file" +done + diff --git a/bashrc.d/00-homebin.bashrc b/bashrc.d/00-homebin.bashrc new file mode 100644 index 0000000..4e0a90e --- /dev/null +++ b/bashrc.d/00-homebin.bashrc @@ -0,0 +1 @@ +export PATH=${PATH}:${HOME}/bin diff --git a/bashrc.d/devkitpro.bashrc b/bashrc.d/devkitpro.bashrc new file mode 100755 index 0000000..5b0ad2a --- /dev/null +++ b/bashrc.d/devkitpro.bashrc @@ -0,0 +1,15 @@ +export DEVKITPRO=${HOME}/devkitPro +export DEVKITARM=${DEVKITPRO}/devkitARM +export DEVKITPPC=${DEVKITPRO}/devkitPPC +export WIILOAD=/dev/ttyUSB0 + +if [ -d "$DEVKITARM" ]; then + export PATH=${PATH}:${DEVKITARM}/bin +fi +if [ -d "$DEVKITPPC" ]; then + export PATH=${PATH}:${DEVKITPPC}/bin +fi +if [ -d "$DEVKITPRO" ]; then + export PATH=${PATH}:${DEVKITPRO}/tools/bin +fi + diff --git a/bashrc.d/fly.bashrc b/bashrc.d/fly.bashrc new file mode 100755 index 0000000..b93c710 --- /dev/null +++ b/bashrc.d/fly.bashrc @@ -0,0 +1,5 @@ +# https://fly.io/ + +if [ -d "${HOME}/.fly" ]; then + export PATH=${PATH}:${HOME}/.fly/bin/ +fi diff --git a/bashrc.d/fpc.bashrc b/bashrc.d/fpc.bashrc new file mode 100755 index 0000000..48cd36b --- /dev/null +++ b/bashrc.d/fpc.bashrc @@ -0,0 +1,5 @@ +export FPC_HOME=${HOME}/fpcupdeluxe/fpc + +if [ -d "$FPC_HOME" ]; then + export PATH=${PATH}:${FPC_HOME}/bin/x86_64-linux +fi diff --git a/bashrc.d/gpg.bashrc b/bashrc.d/gpg.bashrc new file mode 100755 index 0000000..5813ae9 --- /dev/null +++ b/bashrc.d/gpg.bashrc @@ -0,0 +1,3 @@ +# for clojars deployment crap +# TODO: is this still necessary? +export GPG_TTY=$(tty) diff --git a/bashrc.d/node.bashrc b/bashrc.d/node.bashrc new file mode 100755 index 0000000..fe493cc --- /dev/null +++ b/bashrc.d/node.bashrc @@ -0,0 +1,15 @@ +# https://github.com/nodenv/nodenv + +function install_nodenv { + if command -v nodenv &> /dev/null; then + echo "Nodenv is already installed." + return 1 + fi + + git clone https://github.com/nodenv/nodenv.git ${HOME}/.nodenv +} + +if [ -d "${HOME}/.nodenv" ]; then + export PATH=${PATH}:${HOME}/.nodenv/bin + eval "$(${HOME}/.nodenv/bin/nodenv init - bash)" +fi diff --git a/bashrc.d/pokeget.bashrc b/bashrc.d/pokeget.bashrc new file mode 100755 index 0000000..c9bb515 --- /dev/null +++ b/bashrc.d/pokeget.bashrc @@ -0,0 +1,8 @@ +# https://github.com/talwat/pokeget-rs + +if command -v pokeget &> /dev/null; then + if [ -z "${TERMINAL_EMULATOR}" ] && [ -z "${NVIM}" ]; then + pokeget -random 1 -small + echo + fi +fi diff --git a/bashrc.d/ruby.bashrc b/bashrc.d/ruby.bashrc new file mode 100755 index 0000000..e516675 --- /dev/null +++ b/bashrc.d/ruby.bashrc @@ -0,0 +1,14 @@ +# https://github.com/rbenv/rbenv + +function install_rbenv { + if command -v rbenv &> /dev/null; then + echo "Rbenv is already installed." + return 1 + fi + + git clone https://github.com/rbenv/rbenv.git ${HOME}/.rbenv +} + +if [ -d "${HOME}/.rbenv" ]; then + eval "$(${HOME}/.rbenv/bin/rbenv init - --no-rehash bash)" +fi diff --git a/bashrc.d/rust.bashrc b/bashrc.d/rust.bashrc new file mode 100755 index 0000000..bfe75bd --- /dev/null +++ b/bashrc.d/rust.bashrc @@ -0,0 +1,22 @@ +export RUSTUP_INIT_SKIP_PATH_CHECK=yes + +# https://rustup.rs/ +function install_rustup { + if command -v rustup &> /dev/null; then + echo "Rustup is already installed." + return 1 + fi + + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path +} + +if [ -d "${HOME}/.cargo" ]; then + if [ -e "${HOME}/.cargo/env" ]; then + source "$HOME/.cargo/env" + fi + + export CARGO_TARGET_DIR="$HOME/.cache/cargo-target" + if [ ! -e "${CARGO_TARGET_DIR}" ]; then + mkdir -p "$CARGO_TARGET_DIR" + fi +fi