7 Commits
0.1.1 ... 0.1.2

Author SHA1 Message Date
c8758fe259 neatly formatted for loop for better human reading
not that you would ever need to go into that manually anyway, but still...
2021-07-17 15:57:52 +02:00
597354356b for some reason sometimes I do not have home bin folder added automatically
no problem, fixed
2021-07-17 15:57:27 +02:00
f5fb8e5dc3 newrepo convenience alias added 2021-07-09 18:39:31 +02:00
82f2d7a989 today I'm stupid, what can you do about it? 2021-06-03 17:47:29 +02:00
7d8f7312f1 oopsie.. 2021-06-03 17:45:49 +02:00
9851de3007 may the Force be with you 2021-06-03 17:44:18 +02:00
8866dc5bec quality of life, terminal server version
- cleanup is now opt-in instead of opt-out
- added server parameter to deploy with a different terminal scheme
2021-06-03 17:39:45 +02:00
5 changed files with 44 additions and 7 deletions

View File

@@ -1,4 +1,12 @@
for source in colored_commands convenience_aliases git_functions histcontrol ls_aliases safety_aliases terminal_colors terminal_fancyfying; do for source in colored_commands \
convenience_aliases \
git_functions \
histcontrol \
home_bin_folder \
ls_aliases \
safety_aliases \
terminal_colors \
terminal_fancyfying; do
if [ -f ~/.bashrc_overrides/$source ]; then if [ -f ~/.bashrc_overrides/$source ]; then
. ~/.bashrc_overrides/$source . ~/.bashrc_overrides/$source
fi fi

View File

@@ -1,3 +1,4 @@
alias pubkey='cat ~/.ssh/id_rsa.pub' alias pubkey='cat ~/.ssh/id_rsa.pub'
alias hosts='sudo nano /etc/hosts' alias hosts='sudo nano /etc/hosts'
alias historygrep='history | grep' alias historygrep='history | grep'
alias newrepo='bash <(curl -s https://get.bjphoster.com/new-git-repo.sh)'

View File

@@ -0,0 +1,4 @@
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi

View File

@@ -0,0 +1,13 @@
GIT_FUNCTIONS=true
# Spaced
#PS1="${LIGHTBLUE}[ ${LIGHTRED}\u ${LIGHTBLUE}@ ${LIGHTBROWN}$(hostname --fqdn) ${LIGHTBLUE}] ${LIGHTPURPLE}( ${GREEN}\w ${LIGHTPURPLE}) "
# Not spaced
PS1="${LIGHTBLUE}[${LIGHTRED}\u${LIGHTBLUE}@${LIGHTBROWN}$(hostname --fqdn)${LIGHTBLUE}]${LIGHTPURPLE}(${GREEN}\w${LIGHTPURPLE})"
if [ $GIT_FUNCTIONS ]; then
#PS1="$PS1${LIGHTPURPLE}[${LIGHTCYAN}$(__git_prompt)${LIGHTPURPLE}]"
PS1="$PS1${LIGHTBROWN}(${LIGHTCYAN}\$(__git_prompt)${LIGHTBROWN}) "
fi
PS1="$PS1${RED}#${FORMAT_RESET}"

View File

@@ -1,12 +1,18 @@
#!/usr/bin/env bash #!/usr/bin/env bash
THIS="$(dirname "$(readlink -fm "$0")")" THIS="$(dirname "$(readlink -fm "$0")")"
CLEANUP=true SERVER=false
FORCE=false
CLEANUP=false
_arguments() { _arguments() {
for PARM in "$@"; do for PARM in "$@"; do
if [ "${PARM}" = "--no-cleanup" ]; then if [ "${PARM}" = "--server" ]; then
CLEANUP=false SERVER=true
elif [ "${PARM}" = "--force" ]; then
FORCE=true
elif [ "${PARM}" = "--cleanup" ]; then
CLEANUP=true
elif [ "${PARM}" = "-h" ] || [ "${PARM}" = "--help" ]; then elif [ "${PARM}" = "-h" ] || [ "${PARM}" = "--help" ]; then
_help _help
exit 0 exit 0
@@ -15,11 +21,12 @@ _arguments() {
} }
_help() { _help() {
echo "Usage: $(readlink -fm "$0") [-h | --help] [--no-cleanup]" echo "Usage: $(readlink -fm "$0") [-h | --help] [--cleanup]"
echo echo
echo "Options:" echo "Options:"
echo " -h | --help : Prints this help message and quits" echo " -h | --help : Prints this help message and quits"
echo " --no-cleanup: Does not clean the source folder after adding the bash overrides" echo " --server: Customizes the terminal feel for a server installation"
echo " --cleanup: Removes the source folder after installation"
echo echo
} }
@@ -38,7 +45,7 @@ _cleanup() {
_main() { _main() {
_arguments "$@" _arguments "$@"
if [ ! -z "$(grep "#REF:bashrc_overrides:REF" ~/.bashrc)" ]; then if [ ! -z "$(grep "#REF:bashrc_overrides:REF" ~/.bashrc)" ] && [ "${FORCE}" = false ]; then
echo "bash overrides already in place" echo "bash overrides already in place"
echo "skipping..." echo "skipping..."
echo echo
@@ -48,6 +55,10 @@ _main() {
echo echo
fi fi
if [ "${SERVER}" = true ]; then
sed -i 's/terminal_fancyfying/terminal_fancyfying_server/' ~/.bashrc_overrides/_all
fi
if [ "${CLEANUP}" = true ]; then if [ "${CLEANUP}" = true ]; then
echo "cleaning up..." echo "cleaning up..."
_cleanup _cleanup