add bashrc scripts

This commit is contained in:
Gered 2024-09-14 17:05:53 -04:00
parent 1e71a6a75c
commit 89c248049f
10 changed files with 108 additions and 0 deletions

20
bashrc Normal file
View file

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

View file

@ -0,0 +1 @@
export PATH=${PATH}:${HOME}/bin

15
bashrc.d/devkitpro.bashrc Executable file
View file

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

5
bashrc.d/fly.bashrc Executable file
View file

@ -0,0 +1,5 @@
# https://fly.io/
if [ -d "${HOME}/.fly" ]; then
export PATH=${PATH}:${HOME}/.fly/bin/
fi

5
bashrc.d/fpc.bashrc Executable file
View file

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

3
bashrc.d/gpg.bashrc Executable file
View file

@ -0,0 +1,3 @@
# for clojars deployment crap
# TODO: is this still necessary?
export GPG_TTY=$(tty)

15
bashrc.d/node.bashrc Executable file
View file

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

8
bashrc.d/pokeget.bashrc Executable file
View file

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

14
bashrc.d/ruby.bashrc Executable file
View file

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

22
bashrc.d/rust.bashrc Executable file
View file

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